Author Topic: Allow access with restriction ?  (Read 4576 times)

0 Members and 1 Guest are viewing this topic.

Offline Pat

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Allow access with restriction ?
« on: September 19, 2011, 12:41:32 AM »
I'd like to allow the 'ulx adduser' command to admins however is it possible for them to just be able to add normal users to a certain group and nothing else?

I'll explain the situation. On my server there are ranks from user, user+, respected, and then admin.

I'd like to give admins the ability to give any normal user, the user+ rank but nothing else.

Thought I'd come here and ask before writing something to handle this, might be a easy tag or something I have to add to the command arguments (like with immunity)

Cheers. :)

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Allow access with restriction ?
« Reply #1 on: September 19, 2011, 10:10:04 AM »
Yes, ULX supports this. The easiest way would probably be to use XGUI (look at adduser permission) to set it up, though you could do it via a command as well if you look up the appropriate syntax.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Allow access with restriction ?
« Reply #2 on: September 19, 2011, 10:31:52 AM »
Pat,
See this post. http://forums.ulyssesmod.net/index.php/topic,4314.0.html
It and a few replies to it contain examples of various restriction methods within console command line and groupallow
XGUI I believe would allow you to do same if you're using from within game (as it allows GUI control to every console command).
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Pat

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Allow access with restriction ?
« Reply #3 on: September 20, 2011, 11:59:31 PM »
So something like this would work if I were to choose to do it via command;

Code: [Select]
ulx groupallow admin "ulx adduser" "%user user+"
ulx groupallow admin "ulx adduserid" "%user user+"

Would that be correct, or have I got the wrong idea?

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Allow access with restriction ?
« Reply #4 on: September 21, 2011, 11:55:02 AM »
So something like this would work if I were to choose to do it via command;

Code: [Select]
ulx groupallow admin "ulx adduser" "%user user+"
ulx groupallow admin "ulx adduserid" "%user user+"

Would that be correct, or have I got the wrong idea?

I haven't tested it, but I think that would work for the "adduser" command. If you find that it still lets them muck with higher ranks, try replacing %user with !%user+. "adduserid" is different (and won't work the way you have it) since it's targeting an ID and not a connected user. You might consider just revoking their access to that command.
Experiencing God's grace one day at a time.

Offline JamminR

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 8096
  • Karma: 390
  • Sertafide Ulysses Jenius
    • Team Ulysses [ULib/ULX, other fine releases]
Re: Allow access with restriction ?
« Reply #5 on: September 21, 2011, 02:15:33 PM »
Ah Ha! I knew I'd seen something "like" this requested before.
This link is not the same question, but is similar and could be handy for you, or anyone else that ever stumbles across this post and question in the future.
http://forums.ulyssesmod.net/index.php/topic,5313.msg23630.html
"Though a program be but three lines long, someday it will have to be maintained." -- The Tao of Programming

Offline Pat

  • Newbie
  • *
  • Posts: 3
  • Karma: 0
Re: Allow access with restriction ?
« Reply #6 on: September 26, 2011, 11:07:56 PM »
I haven't tested it, but I think that would work for the "adduser" command. If you find that it still lets them muck with higher ranks, try replacing %user with !%user+. "adduserid" is different (and won't work the way you have it) since it's targeting an ID and not a connected user. You might consider just revoking their access to that command.

Tested and what I posted works like a charm, admins can now only add normal users to the group user+.
Thanks for the heads up involving "adduserid", just didn't bother adding it for admins.

Ah Ha! I knew I'd seen something "like" this requested before.
This link is not the same question, but is similar and could be handy for you, or anyone else that ever stumbles across this post and question in the future.
http://forums.ulyssesmod.net/index.php/topic,5313.msg23630.html

Thanks, that clears up a few things for me regarding how it works. :)
« Last Edit: September 26, 2011, 11:09:34 PM by Pat »