Author Topic: How exactly does inheritance work?  (Read 2199 times)

0 Members and 2 Guests are viewing this topic.

Offline Mornedil

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
How exactly does inheritance work?
« on: April 09, 2015, 02:49:24 PM »
I've googled around and haven't found the answer I'm looking for.

Basically, I'm wondering what it is exactly that a group inherits from another group?

Do they also inherit commands?
For example, I have set it up so that users can use !god and !ungod with the ^ target parameter (so they can only target themselves).
I'm now adding a Builder rank which users are autopromoted to after x hours. Do they automatically inherit !god and !ungod or do I need to tick the checkbox and set up the target parameters for them as well?

Sorry if this has been asked before, but I couldn't find this in the FAQ section or when googling
« Last Edit: April 09, 2015, 02:51:32 PM by Mornedil »

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: How exactly does inheritance work?
« Reply #1 on: April 09, 2015, 03:48:48 PM »
You are correct in your assumption. The parameters of the access are also inherited.
Experiencing God's grace one day at a time.

Offline Mornedil

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
Re: How exactly does inheritance work?
« Reply #2 on: April 09, 2015, 06:51:28 PM »
hmm. that raises more questions. Assuming Operators inherit from Users:

If Users have access to !god with the restrict players parameter set to ^, then what happens if...
  • ... Operators have the !god checkbox ticked, but no parameters are set?
  • ... Operators doesn't have the !god checkbox ticked at all?

I mean, at a certain point the Operator's settings must take priority (like an obvious example: If users have the checkbox unticked and Operators have it ticked, then it's obviously enabled for operators).


I apologize if this seems stupid, but it's hard to know these things without knowing the inner workings of ULX.

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2728
  • Karma: 430
    • |G4P| Gman4President
Re: How exactly does inheritance work?
« Reply #3 on: April 10, 2015, 05:51:17 AM »
I'm not sure how Stickly has XGUI set up to read the inherit permissions but if user has access to something and operator inherits user then operator would also have access to that as well with all of the same parameters.

If you allow or deny something on operator, it'll take precedence over what it inherits.
Ex: If user is allowed to teleport and you revoke that permission from operator, then operator wouldn't be able to do it even though it inherits user.
Denys always supersede allows.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: How exactly does inheritance work?
« Reply #4 on: April 13, 2015, 11:26:52 AM »
A few more thoughts:
ULX only supports a "deny" for individual users, and XGUI does have an interface to specify those- it's something I never got around to. :(
So, if user had access to god, operator would show "god" checked, but greyed out. You wouldn't be able to deny a higher group that permission.

You could give access to god at the operator level- any restrictions specified there would completely override the restrictions placed on lower levels.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Mornedil

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
Re: How exactly does inheritance work?
« Reply #5 on: April 15, 2015, 04:33:11 AM »
A few more thoughts:
ULX only supports a "deny" for individual users, and XGUI does have an interface to specify those- it's something I never got around to. :(
So, if user had access to god, operator would show "god" checked, but greyed out. You wouldn't be able to deny a higher group that permission.

You could give access to god at the operator level- any restrictions specified there would completely override the restrictions placed on lower levels.


Did you try clicking the checkbox even though it's grayed out?
Because that worked for me to uncheck it. Now it's not grayed out anymore, even though I checked it back on.

Perhaps ULX simply does not save any settings for specific commands unless you set them?
And if it finds settings for the specific commands from an inherited group they show up as grayed out?

'Cause I have set up Users and Builders to be able to use !god on only ^ (themselves), and set up higher ranks to be able to target * (everyone), which worked even though the boxes were initially grayed out.



Edit:
New question on the same topic:

I want my Operator rank to be classified as "admin" and not "user" by garrysmod. However, it seems to be unchangable from the XGUI?
is there a console command to change it? Or can I create a new "Moderator" rank with admin status?
« Last Edit: April 15, 2015, 05:43:18 AM by Mornedil »

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: How exactly does inheritance work?
« Reply #6 on: April 15, 2015, 08:17:29 AM »

Did you try clicking the checkbox even though it's grayed out?
Because that worked for me to uncheck it. Now it's not grayed out anymore, even though I checked it back on.
Hmm.. Normally, you're supposed to right-click the permission, or click it and use the buttons on the right to apply permissions on top of other groups. I'm pretty sure you're not supposed to be able to uncheck them if they're greyed out. Whoops. I'll check up on that soon :P

Either way, I'm quite sure that ULX does not support denying a privilege at a group level. "ulx groupdeny" will only undo an access given by "ulx groupallow".


I want my Operator rank to be classified as "admin" and not "user" by garrysmod. However, it seems to be unchangable from the XGUI?
is there a console command to change it? Or can I create a new "Moderator" rank with admin status?

I believe that anything that inherits from the "admin" group will return true for :IsAdmin(), and any group that inherits from "superadmin" will return for :IsSuperadmin(). So, you would need to adjust your permission levels around such that your desired group inherits from admin.
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline Mornedil

  • Newbie
  • *
  • Posts: 15
  • Karma: 1
Re: How exactly does inheritance work?
« Reply #7 on: April 17, 2015, 02:15:36 AM »
Hmm.. Normally, you're supposed to right-click the permission, or click it and use the buttons on the right to apply permissions on top of other groups. I'm pretty sure you're not supposed to be able to uncheck them if they're greyed out. Whoops. I'll check up on that soon :P

Either way, I'm quite sure that ULX does not support denying a privilege at a group level. "ulx groupdeny" will only undo an access given by "ulx groupallow".


I believe that anything that inherits from the "admin" group will return true for :IsAdmin(), and any group that inherits from "superadmin" will return for :IsSuperadmin(). So, you would need to adjust your permission levels around such that your desired group inherits from admin.


Thank you!

And sorry, you dont need to look into the checkbox thing - I didn't remember exactly how I got the checkbox unchecked, just that I accidentally did at one point.
 I tried it again, and it was only possible by altering the checkboxes to the right and hitting "apply", as you described. so it seems to work as intended :)