• Print

Author Topic: ULX Groups Help  (Read 4284 times)

0 Members and 1 Guest are viewing this topic.

Offline Gupsy

  • Newbie
  • *
  • Posts: 5
  • Karma: 1
ULX Groups Help
« on: March 16, 2014, 06:12:44 pm »
Hey, I have a list of my groups here
-owner
-coowner
-manager
-superadmin
-admin
-mod
-user
now i have all the inheritance set up right like no one under me can do anything to me etc, But from manager up they can promote there self to owner and also demote me why is this and can i change this so that can only promote to there rank or lower

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: ULX Groups Help
« Reply #1 on: March 16, 2014, 08:19:46 pm »
No. ULX doesn't handle groups in a hierarchy like that. (Unless I'm totally wrong.. someone correct me)

If someone has access to ulx adduser then they can add themselves to whatever group they want.

You could make it to where they can't target themselves, but that would affect all commands, not just adduser.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: ULX Groups Help
« Reply #2 on: March 16, 2014, 08:46:38 pm »
Pretty sure you can limit targeting 'by command'.
/index.php/topic,5346.0.html and the post it links to.
Though the example in the post linked from that FAQ shows preventing banning superadmins, I'd suppose you could replace 'ban' with adduser.
There's also the specific/only these groups "#" command.
I 'think' that ulx groupallow <group> "ulx adduser" "#group1,#group2,group3" would ONLY allow <group> to adduser on group1,2 and 3.

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

Offline MrPresident

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 2727
  • Karma: 430
    • |G4P| Gman4President
Re: ULX Groups Help
« Reply #3 on: March 16, 2014, 08:54:46 pm »
But it wouldn't restrict which groups they could add to right? They could still add users to the owner group.

It's always my philosophy that if you can't trust a user with a command, don't give it to them.

Offline Stickly Man!

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 1270
  • Karma: 164
  • What even IS software anymore?
    • XGUI
Re: ULX Groups Help
« Reply #4 on: March 17, 2014, 10:42:35 am »
JamminR, Mr. President- The group parameter for "ulx adduser" is treated as a StringArg, like so:
https://github.com/Nayruden/Ulysses/blob/master/ulx/lua/ulx/modules/sh/user.lua#L61
Code: Lua
  1. adduser:addParam{ type=ULib.cmds.StringArg, completes=ulx.group_names_no_user, hint="group", error="invalid group \"%s\" specified", ULib.cmds.restrictToCompletes }


Gupsy, this means you should be able to use whitelist restrictions to specify ONLY the groups you want a group to be able to add users to. See the following image from this similar post: http://gyazo.com/07d2f8ece11483bc579f630390362893

This can also be done via command line, if you prefer. Like so:
Code: [Select]
ulx groupallow superadmin "ulx adduser" * "<mod,admin>"(Note, the * will let them target anyone that they're already allowed to target, which is set by the group's can_target field. So, even though this says *, it doesn't mean they can change the group of owners).
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: ULX Groups Help
« Reply #5 on: March 17, 2014, 04:27:43 pm »
Thanks for the clarification Stickly man. I thought I'd seen that somewhere.
Mrpresident is right though.
Too many servers out there seem to give superadmin access to people that shouldn't have it.
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

  • Print