We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 9575
    • 19 Posts
    Hi all,

    Forgive me if this is in the wrong place but it’s my first post and it is quite a big forum smiley

    I’m relatively new to MODx but have already managed to port a few websites to it and am loving the way it works. I do have a couple of things which I haven’t quite been able to understand and for the website I’m currently working on is beginning to confuse me a bit.

    This all relates to users and permissions (normal/manager users not Web Users).

    Firstly, what is the difference between the "Edit a document" and "Save documents" permission under the content management section on roles. I don’t understand how they work. Without being able to save your changes what good would it be editing a document? Am I missing something?

    Secondly, I’m looking for some way to have changes to pages "authorised" by users in a different role. I thought about having two roles (content providers and content publishers) with the publish permission used to separate them. The problem I have is that I want the providers to be able to edit documents which are not published (and possibly copy a published document to one in an unpublished state). My reason behind this is I dont want the providers to be able to edit live pages, but they may need to make changes which then need to be authorised before published (i.e. make a copy of the document, have it authorised and then replace the original). Does that make sense?

    Hope someone can clarify my first point and provide maybe a little guidance on my second.

    Many thanks

    Simon
      • 25663 MODX Staff
      • 12,272 Posts
      You can see all values when opening the edit form, not just an overview.

      There is currently no publishing workflow available for MODx, but there will be after we release Revolution. You can however create a staging workflow and use the GetField snippet to retrieve/build a quasi-approval workflow for selected pages. This doesn’t scale well to large numbers of pages that need approval or large sites in general, but it does work great:

      1) Create a template as you would normally for the to-be-approved content and assign editors to a doc group that can work on these pages. I suggest putting these in an "approval" container doc.

      2) Get the current version of the document updated to how you want it as a baseline starting point then duplicate it. Assign the baseline version to a document group your editors cannot access.

      3) Duplicate the template(s) in step 1, and add a new TV: [*stageID*]. This stage ID is the only template variable you need assigned to the document for content purposes.

      4) In the new template from step 3, replace all calls to TVs/Content with GetField calls, using the [*stageID*] TV to denote the ID of the template you want to use. (It’s further handy to assign the [*stageID*] as a custom dropdown list widget using the @SELECT binding and grabbing the values from the container document to build a list of relevant IDs that only come from the staging document container.)

      5) When you want to push a staging doc live, simply enter the ID of the staging version you approve and change the source doc group to something your editors can’t access.

      Pay attention to how you set up caching so you’re not always dynamically building pages off pages, and feel free to ask more questions to get clarification.

      (I should screencast this ... it’s a lot easier to get it when it’s seen, and it’s a pretty cool trick until we get a real publishing workflow.)
        Ryan Thrash, MODX Co-Founder
        Follow me on Twitter at @rthrash or catch my occasional unofficial thoughts at thrash.me
        • 9575
        • 19 Posts
        Hi Ryan,

        Thanks for your swift feedback. I’m still in a bit of a mix with the Edit/Save options in the permissions. I’ll try and explain better:

        - If I tick the box to say a user can edit documents they can do just that ... edit a document
        - If I tick the box to say a user can save documents then they can click the save button.

        What I don’t understand is what good is the edit document priv? If you tick the edit but not the save boxes you can make changes but can’t actually save them (rendering it useless?), if you tick the save option but not the edit then you can’t edit the document to have and changes to save.

        Am I missing something?
          • 3749
          • 24,544 Posts
          Quote from: felikz at Mar 25, 2009, 09:57 AM

          Hi Ryan,

          Thanks for your swift feedback.  I’m still in a bit of a mix with the Edit/Save options in the permissions.  I’ll try and explain better:

          - If I tick the box to say a user can edit documents they can do just that ... edit a document
          - If I tick the box to say a user can save documents then they can click the save button.

          What I don’t understand is what good is the edit document priv?  If you tick the edit but not the save boxes you can make changes but can’t actually save them (rendering it useless?), if you tick the save option but not the edit then you can’t edit the document to have and changes to save.

          Am I missing something?

          If you didn’t check the "edit" box, they woudn’t be able to see the actual content of the document (including any snippet, chunk, of TV tags).  With "edit" but not "save" they can see the content but can’t change it. Without "edit" they can’t see it at all.

            Did I help you? Buy me a beer
            Get my Book: MODX:The Official Guide
            MODX info for everyone: http://bobsguides.com/modx.html
            My MODX Extras
            Bob's Guides is now hosted at A2 MODX Hosting
            • 9575
            • 19 Posts
            Ahhh, gotcha.

            Thanks for clearing that up!
              • 3749
              • 24,544 Posts
              It’s a little confusing. I guess you could also use it for letting users practice their editing skills before turning them loose on the site. wink
                Did I help you? Buy me a beer
                Get my Book: MODX:The Official Guide
                MODX info for everyone: http://bobsguides.com/modx.html
                My MODX Extras
                Bob's Guides is now hosted at A2 MODX Hosting