ULX

Author Topic: most groups can target superadmins  (Read 7242 times)

0 Members and 1 Guest are viewing this topic.

Offline RageKJ21

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
most groups can target superadmins
« on: April 24, 2014, 05:27:06 PM »
I apologize for repeating this topic for the 3rd or 4th time in this last week.  I have poured through the other threads and still not been able to fix my issues.  I wish ULX would just let you rack and stack a hierarchy in the menu instead of the system we have now.  I really don't want to deal with being banned by a smart @$$ moderator...   

I understand that %group means all that group and that !%group means not that group.

I have set up the inheritance in the order I want the hierarchy in.  Only a few of the ranks seem to be configured correctly, but most are able to target superadmins


From top down, this is the hierarchy I desire, and each group inherits from the group directly below it, and each group can target !%group directly above it.

Superadmin
Admin
Moderator
Donor-Admin
Trialstaff
Donor-Mod
Legacy
Trusted
Regular
User

Moderator and Admin cannot target superadmin, but the rest can

here is the group.txt I've edited out the allowed commands to try and clean it up a bit and make it easier to read. 

http://pastebin.com/7QzPJguT

I've also tried allowing users to target *, to target !%regular, and to target %user

I'm completely lost at this point, I've tried recreating all the groups so the inheritance follows, tried redoing it all in the manage groups tab, tried the cantarget command a bunch of different ways...

With this many people asking this question, I hope the ULX people can come up with a better system, or at least put out an easy guide to establishing rank structure, i love it, but this is really frustrating, and apparently I'm not alone.

Offline xCeph

  • Newbie
  • *
  • Posts: 9
  • Karma: -2
Re: most groups can target superadmins
« Reply #1 on: April 24, 2014, 06:06:05 PM »
This might help:

Go to the ulx menu with !menu, select group management, select "setgroupcantarget", then pick a group. Now type !%GROUPNAMEHERE . Obviously replace that with the group name you don't want it to target. Here's a command example.

!setgroupcantarget donar-admin !%admin - now, group (donar-admin) cannot target admin.

Im doing this from the top of my head so bare with me please!

Offline RageKJ21

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: most groups can target superadmins
« Reply #2 on: April 24, 2014, 06:17:19 PM »
Ive done that, but it removes everyone else that they should be able to target.  I want my moderators to be able to target users.  the command prompt shows that "can only target !%superadmin" and then they end up not being able to target anyone

Offline RageKJ21

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: most groups can target superadmins
« Reply #3 on: April 24, 2014, 06:22:04 PM »
I've double checked that, and they can still target below them, but they can also target above them, just not the superadmin.  So it basically allows them acces to all but the superadmin

Offline xCeph

  • Newbie
  • *
  • Posts: 9
  • Karma: -2
Re: most groups can target superadmins
« Reply #4 on: April 24, 2014, 06:24:38 PM »
Try !setgroupcantarget GROUP %GROUPBELOWTHEM .

Note: the ! Means they CANT target them

Ex: !setgroupcantarget donar-mod %user

Offline RageKJ21

  • Newbie
  • *
  • Posts: 4
  • Karma: 1
Re: most groups can target superadmins
« Reply #5 on: April 24, 2014, 06:33:56 PM »
I understand that, in the original post, and in the group.txt, you should be able to see that its already set up with the !%group below them permissions

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: most groups can target superadmins
« Reply #6 on: April 25, 2014, 11:05:38 AM »
There are several things I can spot that will hopefully help you understand what's going on. (Assuming I'm remembering how groups work properly, it's been a long while with me. :P)

Problem 1: Incorrect can_target for the user group
The % operator is indeed the group operator, but it also obeys inheritance. This means, if you set the can_target to "!%admin", you're really saying "Don't target admins, or anything that eventually inherits from admins", which in your case, includes superadmins.

Therefore, setting your user "can_target" to "%user" means "User can target any group that inherits from user", which basically means.. every group. Thankfully, we've added the # operator which targets a single group, regardless of inheritance. So, I would change the user's can_target field to "#user", which should have the desired effect of users only being able to run commands on other users.


Problem 2: Inheritance branch
Your admin group is currently inheriting directly from user. This is creating a branch in your inheritance tree, which is a very advanced functionality that can take a lot of configuration to get right. After reading your post, it looks like this branch is a mistake. To fix, just set admin's inherited_from to "moderator", then you should be fine.


Problem 3: Is superadmin's can_target set?
Double check and make sure superadmin's can_target is set to "*", which means they can target everyone. It wasn't in the pastebin you sent, so I just wanted to double check.


Hope that fixes your problem!


P.S. I typed up this extra stuff about inheritance branching and ULX, I'll leave it here to be informative and help people considering this option:
Quote
Right now, your tree looks like this (in wonderful ASCII form):

moderator <- donoradmin <- trialstaff <- donormod <- legacy <- trusted <- regular \
                                                                                                                       > user
                                                                                     superadmin <- admin  /

So, when you specify that "donormod" can_target "!%trialstaff", you're saying "donormod can't target trialstaff or any group that inherits from it", meaning donoradmin and moderator. This does NOT say anything about the superadmin and admin groups, which are on a different branch. Unfortunately, due to how the , operator works (as a Union), setting the can_target to "!%trialstaff,!%admin", or even "!%trialstaff,!#superadmin,!#admin" will NOT work like you think it would.

The only benefit branching provides is if you have completely different sets of command accesses you want to give to each branch, say, if you wanted to give moderators something you didn't want to give admins. Still, this can be also solved by using "ulx groupdeny" to prevent a group from inheriting access from a lower command.

So if you want to keep the branching, you'll have to go through each can_target and manually specify the groups you want them to target. donormod's can_target would become: "#legacy,#trusted,#regular,#user" (Needless to say, ULX's targeting system wasn't quite designed to handle this kind of complicated inheritance targeting, Megiddo has mentioned it in other threads.)
« Last Edit: April 25, 2014, 11:09:16 AM by Stickly Man! »
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: most groups can target superadmins
« Reply #7 on: April 25, 2014, 07:55:00 PM »
Stickly, haven't made it that far yet, but you might wanna copy/paste your branching "PS" into the FAQ regarding can target.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming