Subscribe: RSS
  • Is it possible when a user with manager access enters the manager to be able to see ONLY the users that belong to the same usergroup in user page?

    Thanks in advance

    This question has been answered by Bruno17. See the first response.

    • No.
        Studying MODX in the desert - http://sottwell.com
        Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
        Join the Slack Community - http://modx.org
      • I have never, in all my years here, seen this answer. Never. Wow, there is a limitation to Modx!
        • It's definitely an issue. Either you have permission to view, edit, and/or save users or you don't -- period. You can see all the users, or none of them. Similarly, if you has access_permissions permission, you can change anyone's permissions (including the admin super user's and your own).

          I did some work for a client a while back to at least keep members of the Administrator group from showing if you were not a member of that group. It was fairly complex. Some of the MODX processors had to be replaced and there were JS changes as well.
            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
          • I was thinking about this a bit last night, just in terms of how to get around this problem. In an easy way, of course, as I am not a dev, but just like to think about these things conceptually.

            Now if I give my users access to the manager, I can still hide the users, right? I believe that is ok, and that's what Bob says above. So let's hide them from all users other than admin as that's a requirement.

            Ok now, so I will create a new page, outside the manager because that's more convenient. Inside the manager could well create a wealth of other problems.

            Can't I just query a list of users from there? There might be permissions issues, but can't I make a simple page that my users can go to with a tool that queries the list of users and grabs the users from the group that the current user is a member of?

            Imagine I had like 20 teams of 10 people each, and I want people to be able to *see* their team-mates. That should be doable, right?

            The issue as I see it is just a quirk of the manager, as Bob says you can get all or none. Outside the manager...it should be fine, I *think* :-p

            Get (current user) -> group membership;
            Query (user list) for others in group;
            Print :-}
            • Yes. There are a number of snippets available for listing users, including various filtering options. My preference is pdoTools and its pdoUsers snippet. http://docs.modx.pro/en/components/pdotools/snippets/pdousers

              You would still need a snippet to get the current user's group(s) to use (uncached!) as the &groups property value - &groups=`[[!getMyGroups]]`.
              http://stackoverflow.com/questions/13855002/modx-how-to-retrieve-logged-in-web-users-user-group
              http://forums.modx.com/thread/96328/how-i-can-get-usergroup-in-my-page
              [ed. note: sottwell last edited this post 2 years, 7 months ago.]
                Studying MODX in the desert - http://sottwell.com
                Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                Join the Slack Community - http://modx.org
              • hello all, please i need urgent help converting this html code to a wayfinder menu (menu worked fine but i don't see the drop down ):


                <ul class="nav navbar-nav navbar-right">
                <li class="active"><a href="#">Home</a></li>
                <li><a href="services.html">services</a></li>
                <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">about</a>
                <ul class="dropdown-menu" role="menu">
                <li><a href="about.html">About Avon Medical</a></li>
                <li><a href="about.html">Fulfilling our mission</a></li>
                </ul>
                </li>
                <li><a href="#">Patient guide</a></li>
                <li><a href="#">library</a></li>

                <li class="dropdown">
                <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-expanded="false">Education & events</a>
                <ul class="dropdown-menu" role="menu">
                <li><a href="timetable.html">Health days</a></li>
                <li><a href="timetable.html">Outreach calendar</a></li>
                <li><a href="timetable.html">Antenatal classes</a></li>
                </ul>
                </li>
                <li><a href="contact.html">contact</a></li>
                <li class="hidden-xs book"><a href="#" data-toggle="modal" data-target="#appointmefnt_form_pop">book appointment</a></li>
                </ul>
                • jerontopaz maybe someone will notice your post and give you some advice, but perhaps not many will see your post here, hidden at the end of a totally different topic.

                  Pls make a new topic and choose a title that will help you find the people who know wayfinder. Here in General Support or in the main Revo or Evo forums will all be ok, and there may be a wayfinder sub-forum that is active, I am not sure about it.

                  A new topic will get you an answer much quicker. I recommend a title like, How to convert html menu into wayfinder, or menu not visible in wayfinder, something like this.

                  Based on what you mention, that you just can't see the menu, I would recommend looking at the css for visibility:collapse or z-index:99, but that's just guesswork.

                  Best way is choose the right forum, give it a good title, tell us the problem and provide your code so people can get a grasp on where you are.
                  • Thanks Susan, I knew there was a way! smiley
                    • discuss.answer
                      at least, you can restrict the listing in the grid to users in the primarygroup only of the current user with a plugin

                      if ($modx->context->get('key') == "mgr") {
                      
                          switch ($modx->event->name) {
                      
                              case 'OnMODXInit':
                      
                      
                                  $action = $modx->getOption('action', $_REQUEST, '');
                                  if ($action == 'security/user/getList') {
                      
                                      $group = $modx->user->getPrimaryGroup();
                      
                      
                                      $_POST['usergroup'] = $group->get('id');
                                      
                                  }
                                  break;
                      
                      
                          }
                      
                      }
                      return;
                        -------------------------------

                        you can buy me a beer, if you like MIGX

                        http://webcmsolutions.de/migx.html

                        Thanks!