ULX

Author Topic: User Management  (Read 10592 times)

0 Members and 1 Guest are viewing this topic.

Offline comradeboris

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
User Management
« on: June 26, 2011, 01:41:56 PM »
Hi guys

Posted the following on Face Punch, just trying to work out if this is possible. Only response Ive had so far is from one guy who said he couldn't figure this out either.

Quote
Hi

Been using ULX on my new server for the last week, and have been very satisfied by its simplicity and functionality (especially when put together with URS, UPPL and UPS).

One problem I have and can't seem to figure out, perhaps someone has a simple answer.

Basically I'm a SuperAdmin and I want to have Admins and Moderators on my server. My problem is that I want an Admin to be able to add someone to the Moderator group. When I give the an Admin the ulx adduser command they are able to promote themselves straight to SuperAdmin.

In other words, I want to be able to restrict the adduser command so users cant promote themselves or anyone else higher than the rank they already are. So basically if your an admin you can promote someone to moderator or admin, but not SuperAdmin.

Am I making sense?

Really sorry if theirs a very simple answer, I have tried to do this myself but have so far failed.

Thanks in advance!

- Tom

Update on what I've done so far:

I've changed the "CanTarget" field on the admin so he can't target superadmins or other admins... "!%admin,!%superadmin" - So he can't target other admins or superadmins with his commands.

Ive also done the following command: ulx groupallow admin "ulx adduser" "!%admin,!%superadmin" - So he can't use this command on himself (hes an admin), other admins and superadmins.

So far the admin can't select an admin or a superadmin in the adduser menu which is great as it means he can't just promote himself to superadmin. However theirs no way to stop him/her from simply promoting someone else to superadmin, and the new superadmin promoting him/her.

Ive spent quite some time reading the stickies etc... Ive tried my best but I don't seem to be getting anywhere...

I just want to basically have a setup where I can promote someone to admin, who can in turn promote others to moderator. I want my other admins/moderators to be able to use the adduser command without allowing them to promote each other to superadmin.

Hope I'm being clear, sorry If its a little confusing.

Thanks in advance for any tips!

- Tom

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: User Management
« Reply #1 on: June 26, 2011, 02:08:08 PM »
Tom,

Thanks for coming to our forums for this issue. It's understandable that you wouldn't get a response on FP since this is a more advanced feature of ULX that not many people use.

Your problem comes from the fact that you're trying to do something that I had never considered when I programmed the command restrictions. Good for you for stretching the possibilities of our system!

Even though what you're attempting isn't directly supported, I still have good news. You can accomplish the same thing by dumbing the permission down a little. ULX is reading in permissions for what a user can promote others to as a list of strings, not a group syntax.

Say I want to allow admins to set any user into operator or admin status, I'd use the following command (notice the comma separating what they're allowed to input into the group field):
Code: [Select]
ulx groupallow admin "ulx adduser" "* <operator,admin>"
But good initiative trying to figure this out on your own! It's refreshing to see users who don't want to be spoon-fed. :)
« Last Edit: June 26, 2011, 04:05:36 PM by Megiddo »
Experiencing God's grace one day at a time.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: User Management
« Reply #2 on: June 26, 2011, 02:46:34 PM »
For those of you who are curious, the same thing that Megiddo suggested can be accomplished in-game with XGUI:




Also Tom, each command has its own "Restrict Player(s)" section where you can set a different "can_target" like value for each command. Therefore you don't have to set a global can_target for the whole group if you only need to set it for ulx adduser. (In console this would be accomplished like Megiddo mentioned above, like this: )

Code: [Select]
ulx groupallow admin "ulx adduser" "!%superadmin" "operator,admin"
Join our Team Ulysses community discord! https://discord.gg/gR4Uye6

Offline comradeboris

  • Newbie
  • *
  • Posts: 14
  • Karma: 0
Re: User Management
« Reply #3 on: June 26, 2011, 04:02:05 PM »
Thank-you both of you!

I've been playing with it for the past few days (to the fury of my brother who I've been constantly demoting/promoting etc).

Thanks to your help it's all working exactly as I wished!

Thanks for the support people, really appreciated.

@ Megiddo ULX has endless possibilities, keep up maintaining this great project! My server is full of U- addons. I've Got the whole suite and it runs like a charm.

@ Stickly Man I didn't realize XGUI allowed me to fine tune my restrictions on an individual command basis like that, thanks!

- Tom