ULX

Author Topic: Rank hierarchy issues  (Read 3212 times)

0 Members and 1 Guest are viewing this topic.

Offline Zellogi

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Rank hierarchy issues
« on: May 22, 2018, 11:26:24 PM »
So, before I start, I'm not the most well versed in ULX. I looked up several guides on how to accomplish what it is I wanted, all of which failed. Before I tried doing this, my issue wasn't a thing, but now I must've mucked something up (and I don't know what), so here I am!

What I wanted to do: I wanted to give my admins access to "adduser" and "removeuser", but with limitations. I've seen threads about this and tried their solution and it didn't work for me. I wanted to give them access to adduser, but only with the option to target users, and add them to "trusted", and removeuser would act as the opposite: only able to target trusted to revoke it if they abuse it. I set the restrict groups to trusted so only trusted could be assigned, that part worked. However, admins could target ALL users with the adduser command, regardless of what setting I used in the restrict players section.

I thought this was a hierarchy problem with permission inheritance so I rearranged the inheritances from lowest (user) to highest (owner), and not only did that not fix my issue, a whole slew of other issues arose from it (admins being able to target superadmin-class users with commands they have access to, for example). I will upload the groups.txt from the server and if anyone can tell me where I went wrong with inheritances and the like, that would be awesome!

For anyone who's curious on the rank hierarchy from highest to lowest (and their ulx name in parenthesis):
  • Owner (owner)
  • Deputy Owner (deputy owner)
  • Super Admin (superadmin)
  • Manager (manager)
  • Supreme VIP Admin (supreme vip admin)
  • Premier VIP Admin (premier vip admin)
  • VIP Admin (vip admin)
  • Admin (admin)
  • Supreme VIP Moderator (supreme vip moderator)
  • Premier VIP Moderator (premier vip moderator)
  • VIP Moderator (vip moderator)
  • Moderator (moderator)
  • Supreme VIP Trial Moderator (supreme vip trial)
  • Premier VIP Trial Moderator (premier vip trial)
  • VIP Trial Moderator (vip trial)
  • Trial Moderator (trial)
  • Supreme VIP (supreme vip)
  • Premier VIP (premier vip)
  • VIP (vip)
  • Regular (regular)
  • Trusted (trusted)
  • Visitor (user)
My ULib/ULX versions:
ULib v2.63
ULX v3.73

Game mode(s) I am having this problem on:
Sandbox

Offline BlueNova

  • Full Member
  • ***
  • Posts: 113
  • Karma: 13
  • The most powerful force in the universe.
Re: Rank hierarchy issues
« Reply #1 on: May 23, 2018, 04:55:14 PM »
Side note, I'm not sure it's the best idea to give group names spaces. Also it's generally advised against placing any group above superadmin.


Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rank hierarchy issues
« Reply #2 on: May 24, 2018, 10:17:34 PM »
"ulx debuginfo" from server console when a few various ranks are on, especially someone from the admin limited group.
Attach file to next post.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zellogi

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Rank hierarchy issues
« Reply #3 on: May 25, 2018, 11:55:11 PM »
Here's your debug dump as requested. Also I fixed the problem of admins targeting superadmins but they can still target themselves and other admins with adduser and removeuser.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Rank hierarchy issues
« Reply #4 on: May 26, 2018, 08:57:10 AM »
Quick 30 second cursory glance, to prevent from modifying themselves, !^
I'll try to find time/search the discussions on this subject somewhere on our forums. I know it's been discussed.
(Fellow team and community members, if you have the answer off top of your head, feel free to pitch in - I myself have never gone as complex as modifying group permissions to specific targets)

I will say this, you've complicated your perms system. Though giving owner/deputy owner permissions manually works, you could have saved yourself lots of time by having them inherit superadmin, then just adding non-ULX required permissions.

"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Zellogi

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Rank hierarchy issues
« Reply #5 on: May 26, 2018, 09:08:47 PM »
Quick 30 second cursory glance, to prevent from modifying themselves, !^

Can you add multiple arguments to the restrict players section? If I do !^, it'll stop it from using it on themselves but won't stop them from doing it on others.

I will say this, you've complicated your perms system. Though giving owner/deputy owner permissions manually works, you could have saved yourself lots of time by having them inherit superadmin, then just adding non-ULX required permissions.

We were originally gonna use superadmin as an actual rank and deputy owner/owner was gonna be higher with all perms but we instead came up with manager and just use superadmin for inheritance. I've fixed it after submitting debug info so deputy owner/owner inherit from superadmin.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Rank hierarchy issues
« Reply #6 on: May 27, 2018, 05:47:48 AM »
Can you add multiple arguments to the restrict players section? If I do !^, it'll stop it from using it on themselves but won't stop them from doing it on others.

The comma is a union operator, so that approach wouldn't work. In general, with more complex group hierarchies, the best method is to specify each group they can target, rather than can't target. For example, if they should be able to target users and operators, use "#user,#operator".
Experiencing God's grace one day at a time.

Offline Zellogi

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Rank hierarchy issues
« Reply #7 on: May 27, 2018, 02:49:09 PM »
For example, if they should be able to target users and operators, use "#user,#operator".

I tried this and they could still target admins with it. I tried setting adduser to #user and removeuser to #trusted and they could still target admins.

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6213
  • Karma: 394
  • Project Lead
Re: Rank hierarchy issues
« Reply #8 on: May 28, 2018, 04:00:14 PM »
I tried this and they could still target admins with it. I tried setting adduser to #user and removeuser to #trusted and they could still target admins.

Set it like that again, confirm that they can still target admins, then post the results of "ulx debuginfo" here.
Experiencing God's grace one day at a time.

Offline Zellogi

  • Newbie
  • *
  • Posts: 7
  • Karma: 0
Re: Rank hierarchy issues
« Reply #9 on: May 28, 2018, 08:02:03 PM »
One of my friends (who is well versed in ULX, way more than I am) offered to fix it for me and he did so problem solved... though I have no idea what he did lol