We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 12793
    • 293 Posts
    Hi, I would like to change modx with and "hard coding" changing code....

    suppose that I’ve 2 profile

    Profile X (admin users)
    Profile Y (editor users)

    I would like to change code for, after each click on "save" button

    set automatially publish as "disabled" if click "save" is by "Profile Y"

    Do you think that is it possible?

    Thanks
      • 12793
      • 293 Posts
      Isn’t possible?? sad
        • 15083
        • 697 Posts
        Are you using revo or evo?
        I know in Evo u can just write a small plugin.
        Put each user into a different user group.
        In the plugin check the users ground and do x, for the other guy in the other group do y.

        For revo im not sure, but either way u need to provide a little bit more info to get help smiley
          • 12793
          • 293 Posts
          Thanks for help me!! I’m using Revo

          I’ve 2 profile... for each change of users of Profile X (if you prefer and it’s more simple I can manage this using onlu user_id and not user_profile) I want automatically set published to FALSE ... this users can’t change published flag

          Only specifi users (Profile X ... or a specific user_id) can set as published the resource!

          Thanks
            • 15083
            • 697 Posts
            Quote from: il_dandi at Apr 05, 2011, 08:50 AM

            Thanks for help me!! I’m using Revo

            I’ve 2 profile... for each change of users of Profile X (if you prefer and it’s more simple I can manage this using onlu user_id and not user_profile) I want automatically set published to FALSE ... this users can’t change published flag

            Only specifi users (Profile X ... or a specific user_id) can set as published the resource!

            Thanks

            U can do this with revolution as the user control on the backend is very granular.
            To setup a user with restricted access just search this forum for another post i put up that i cant find!
            "Setting up a restricted user in revo" or somtin like that smiley

            U can then change their Access Policy and remove the publish settings.
            This should effectivly stop them from publishing a resource.

            Be warned....it’s a complicated tricky area of revo, and the cause of much debate on these forums.
            Good luck...


              • 12793
              • 293 Posts
              Thanks for you reply

              Quote from: jusmeig at Apr 06, 2011, 04:56 AM

              U can then change their Access Policy and remove the publish settings.
              This should effectivly stop them from publishing a resource.


              Yes... but If I’ve an existings resource (not a new resource) that now it’s published; when a specific user changes the content... also if the resource is already published I’d like to set it as "non published" ... this when the changes is made from user that can’t (publish)
              This mean, set to "non published" all existings resources changed by a specific user and allow only other specif user (admin) to set resources as "published"


              Thanks
                • 15083
                • 697 Posts
                Quote from: il_dandi at Apr 07, 2011, 04:58 AM

                Thanks for you reply

                Yes... but If I’ve an existings resource (not a new resource) that now it’s published; when a specific user changes the content... also if the resource is already published I’d like to set it as "non published" ... this when the changes is made from user that can’t (publish)
                This mean, set to "non published" all existings resources changed by a specific user and allow only other specif user (admin) to set resources as "published"


                Thanks

                How many resources are you dealing with. Do it manually and then have your plugin/whatever handle things going forward?
                  • 12793
                  • 293 Posts
                  I don’t have many resources ... but the problme is that I’ve to allow others to manage this portal
                    • 12793
                    • 293 Posts
                    What can I do?? sad
                      • 15083
                      • 697 Posts
                      Quote from: il_dandi at Apr 08, 2011, 04:26 PM

                      What can I do?? sad

                      You need to create new resource groups. IE:

                      resource_group_1
                      resource_group_2
                      resource_group_3
                      etc

                      You can then add the individual resources to the correct group for each user.
                      You then create new users and give them a specific resource group.
                      IE:
                      user_john -> resource_group_1 (John resources live in resource_group_1)

                      This will mean when they login to the MODx backend, they ONLY see their resources (as the other ones are not in their group)
                      Using the access control section u can add rules to allow them to create new resources and save them, but not publish them.

                      This, to the best of my knowledge, is what you are trying to do?