We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 7455
    • 2,204 Posts
    I am creating a big site that have diff groups that must be able to create there own galleries,

    now the owner of page 1 can also manage pictures on page to not owned by him, is there an option to only show the button to admin and page owner? or usergroep?
    would be good that maxigallery respects the document groups from the manager if a manager user is not allowed to edit the page then he should also not be able to upload images to that page using maxigallery.

    I serach the forums and the wiki but did not find an anwer (does not mean that there is not one)

    could someone clarify how this works or if it is possible to do it in any other way?
    or do I have to hack the snippet to add this?


    HERE IS THE FIX

    Dimmy
      follow me on twitter: @dimmy01
      • 4172
      • 5,888 Posts
      I didn’t see a parameter for it, but I think you can hide the manage-button with a phx-modifier, which checks the usergroup and pageowner.
        -------------------------------

        you can buy me a beer, if you like MIGX

        http://webcmsolutions.de/migx.html

        Thanks!
        • 7455
        • 2,204 Posts
        That would be great but i think that it should be in the maxigallery as an option?
        its not logical that somone can add foto’s to a page he has no rights to be on in the first place, unles you alow it tru a parameter in the call or config

        Dimmy
          follow me on twitter: @dimmy01
          • 3749
          • 24,544 Posts
          Maybe I’m misunderstanding you, but it should be possible to create the gallery pages with &admin_webgroups and/or &admin_webusers in the MG call to control who can manager the pics.
            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
            • 7455
            • 2,204 Posts
            Quote from: BobRay at Sep 25, 2008, 01:27 AM

            Maybe I’m misunderstanding you, but it should be possible to create the gallery pages with &admin_webgroups and/or &admin_webusers in the MG call to control who can manager the pics.


            yes but that is for web groups and webuser only I need it for manager users.
              follow me on twitter: @dimmy01
              • 3749
              • 24,544 Posts
              Quote from: Dimmy at Sep 25, 2008, 02:23 AM

              Quote from: BobRay at Sep 25, 2008, 01:27 AM

              Maybe I’m misunderstanding you, but it should be possible to create the gallery pages with &admin_webgroups and/or &admin_webusers in the MG call to control who can manager the pics.


              yes but that is for web groups and webuser only I need it for manager users.

              If you also make them webusers wouldn’t it work to control their access?
                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
                • 16183
                • 1,390 Posts
                I think what Dimmy is saying is that he wants to avoid cross-editing, right? i.e., users in group 1 should only be able to manager their photos and not those of others, say group 2, 3, etc, right? Am also interested in an answer, thx

                From MG wiki:

                &admin_webusers

                Web usernames that have admin user privileges and who are allowed to manage all pictures in the gallery.

                So this won’t work right? Since they can manage all pictures in the gallery. Sorry Dimmy, am not hijacking your post, just interested in an answer too wink
                  • 7455
                  • 2,204 Posts
                  NP

                  yes that is my point
                  I am not using WEB users they are all MANAGER users
                  and there is an restriction that one manager user can not delete some other images (they do not even see them in the manage image part) but he is alowed to add images on that page.

                  is short:
                  if manager user is not owner / creator of that page (or is not in that usergroup would be better i think)
                  then the manage pictures button must NOT apear on the page.
                  in the manager no rights to edit that page then in the front no rights to do that.
                    follow me on twitter: @dimmy01
                    • 36416
                    • 589 Posts
                    Quote from: Dimmy at Sep 25, 2008, 06:26 AM

                    if manager user is not owner / creator of that page (or is not in that usergroup would be better i think)
                    then the manage pictures button must NOT apear on the page.

                    Quick and dirty solution that enables editing only for document creator:
                    edit galleryoutertpl.html and wrap [+maxigallery.managebutton+] block at the top with the following PHx (pseudocode) check
                    [+maxigallery.pageinfo.createdby+] is [+phx:userinfo=`id`+]
                      • 7923
                      • 4,213 Posts
                      I think that’s how it should work by default.. atleast that’s how I implemented it at some point.

                      Only MODx manager users that have rights to edit the MODx document can see the manage button when logged in to MODx backend.

                      And all manager users that have the admin role can also see the manage button.

                      So if the MODx manager user don’t have right to edit the document, he shouldn’t be seeing the manage pictures button. Did you try it?


                        "He can have a lollipop any time he wants to. That's what it means to be a programmer."