1 Reply Latest reply on Jan 16, 2018 1:34 AM by Donna Coles

    How to find Maximum Site Role


      Hi experts,

      I am trying to create a Licensing Audit routine in which i want to verify each user's Max/Server level Role to check if that is Publisher or not - basically what we see at "All Sites" -> Users -> Max Site Role.


      Can someone help please.





        • 1. Re: How to find Maximum Site Role
          Donna Coles

          Hi Syed


          Assuming you've enabled access to the postgres database then the following tables will provide the various bits of info I think you'll need



          select su.id, su.name, l.id, l.name, su.admin_level, s.id, s.name

          from users u

          inner join licensing_roles l on l.id = u.licensing_role_id

          inner join system_users su on su.id = u.system_user_id

          inner join sites s on u.site_id = s.id



          There are dedicated fields that indicate if you're site admin as well as the role you'll have.  Eg in our site, I'm system admin and the above query will report that my role is ID 2 = Interactor, but su.admin_level = 10 which inidcates I'm a system admin. I don't have a multi site set up so don't know the screen you're referring to, but I'm guessing, I'd report as system admin rather than interactor.


          Hopefully the above will at least give you a starting point to write a relevant query over.