• Print

Author Topic: Higher Levels Can't Tweak Superadmins  (Read 4739 times)

0 Members and 1 Guest are viewing this topic.

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Higher Levels Can't Tweak Superadmins
« on: June 23, 2009, 03:38:03 pm »
First off, read the ULX groups.txt below for the hierarchy.

Code: [Select]
"owner"
{
"deny"
{
}
"allow"
{
"ulx adduser"
"ulx adduserid"
"ulx removeuser"
"ulx addgroup"
"ulx removegroup"
"ulx debuginfo"
"ulx hasreadhelp"
}
"inherit_from"
{
"superadmin"
}
}
"superadmin"
{
"deny"
{
}
"allow"
{
"ulx hiddenecho"
"ulx rcon"
"ulx luarun"
"ulx cexec"
"ulx ent"
"ulx userallow"
"ulx userdeny"
"ulx groupallow"
"ulx groupdeny"
"overcomeimmunity"
}
"inherit_from"
{
"admin"
}
}
"admin"
{
"deny"
{
}
"allow"
{
"ulib_passtime"
"ulib_passtimeout"
"ulx spawnecho"
"ulx tsay"
"ulx gimp"
"ulx mute"
"ulx ungimp"
"ulx unmute"
"ulx gag"
"ulx ungag"
"ulx chattime"
"ulx welcomemessage"
"ulx slap"
"ulx whip"
"ulx slay"
"ulx sslay"
"ulx ignite"
"ulx unignite"
"ulx playsound"
"ulx freeze"
"ulx unfreeze"
"ulx noclip"
"ulx hp"
"ulx armor"
"ulx cloak"
"ulx uncloak"
"ulx blind"
"ulx unblind"
"ulx jail"
"ulx unjail"
"ulx ghost"
"ulx unghost"
"ulx ragdoll"
"ulx unragdoll"
"ulx maul"
"ulx strip"
"ulx adminmenu"
"ulx clientmenu"
"ulx mapsmenu"
"ulx showmotd"
"ulx banmenu"
"ulx exec"
"ulx bring"
"ulx goto"
"ulx send"
"ulx tooldeny"
"ulx toolallow"
"ulx tooldenyuser"
"ulx toolallowuser"
"ulx tooldenyoverride"
"ulx map"
"ulx kick"
"ulx ban"
"ulx banid"
"ulx unban"
"ulx spectate"
"ulx votemap2"
"ulx votekick"
"ulx voteban"
"ulx veto"
"ulx settitle"
}
"inherit_from"
{
"operator"
}
}
"user"
{
"deny"
{
}
"allow"
{
"ulx"
"ulx help"
"ulx psay"
"ulx asay"
"ulx thetime"
"ulx menu"
"ulx_valueupdate"
"ulx_cvar"
"ulx_getgamemodes"
"ulx motd"
"ulx_getbans"
"ulx usermanagementhelp"
"ulx who"
"ulx votemap"
"ulx title"
"ulx mytitle"
"ulx teleport"
}
"inherit_from"
{
}
}
"gold"
{
"deny"
{
}
"allow"
{
}
"inherit_from"
{
"user"
}
}
"pink"
{
"deny"
{
}
"allow"
{
}
"inherit_from"
{
"gold"
}
}
"none"
{
"deny"
{
}
"allow"
{
"ulx logecho"
"ulx logfile"
"ulx logevents"
"ulx logchat"
"ulx logspawns"
"ulx logspawnsecho"
"ulx logdir"
"ulx addcsayadvert"
"ulx addforceddownload"
"ulx voteecho"
"ulx votemap2successratio"
"ulx votemap2minvotes"
"ulx votekicksuccessratio"
"ulx votekickminvotes"
"ulx votebansuccessratio"
"ulx votebanminvotes"
"ulx votemapenabled"
"ulx votemapmintime"
"ulx votemapwaittime"
"ulx votemapsuccessratio"
"ulx votemapminvotes"
"ulx votemapvetotime"
"ulx votemapmapmode"
"ulx votemapaddmap"
"ulx rslotsmode"
"ulx rslots"
"ulx rslotsvisible"
"ulx reservedslots"
}
"inherit_from"
{
}
}
"operator"
{
"deny"
{
}
"allow"
{
"ulx seeasay"
"ulx csay"
"ulx physgunplayer"
"ulx vote"
"ulx god"
"ulx ungod"
"ulx addgimpsay"
"ulx addadvert"
}
"inherit_from"
{
}
}

Anyway.

As the only one in the owner group (I realize the HasReadHelp shouldn't be there, but sometimes I demote myself, and I don't want to have to type that command again. I know how to use them, thanks!), I can't demote superadmins to regular admins (superadmins require donations, and sometimes they aren't paid). It says that it disabled that due to security reasons.

Is there a way to not have that, or am I forced to just rename it to "super-admin" or something?

(btw, operator is used as Respected)
Circle reasoning works because circle reasoning works because...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Higher Levels Can't Tweak Superadmins
« Reply #1 on: June 23, 2009, 07:10:12 pm »
You could remove the following block from everywhere it appears in user.lua...

Code: Lua
  1.         if target:IsUserGroup( ULib.ACCESS_SUPERADMIN ) and ply:IsValid() and not ply:IsListenServerHost() then
  2.                 ULib.tsay( ply, "Sorry, for security reasons, you can't change the access of a superadmin!", true )
  3.                 return
  4.         end[/lua]
Experiencing God's grace one day at a time.

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: Higher Levels Can't Tweak Superadmins
« Reply #2 on: June 24, 2009, 07:41:14 pm »
Since I'm a serious nubcake at Lua, would just renaming superadmin to super-admin and adjusting accordingly work?
Circle reasoning works because circle reasoning works because...

Offline Megiddo

  • Ulysses Team Member
  • Hero Member
  • *****
  • Posts: 6214
  • Karma: 394
  • Project Lead
Re: Higher Levels Can't Tweak Superadmins
« Reply #3 on: June 24, 2009, 07:47:57 pm »
It would, but third-party scripts wouldn't recognize these users as superadmins anymore.
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: Higher Levels Can't Tweak Superadmins
« Reply #4 on: June 24, 2009, 09:18:18 pm »
lavacano201014, Many third party scripts, and even Gmod itself, use a lua command called "IsSuperadmin" to test if a player is a superadmin. If you rename it... that will break the group itself.
Though you could do what Megiddo says and remove the safety check code, I have an even better suggestion.
Create a donator group, give it allow access for any superadmin rights you want, and if you want it to have close to superadmin access, have it inherit admin.
Then, you can remove people from it who don't pay.
Don't have that group inherit superadmin, or then they appear as superadmin and can't be removed.

To be perfectly honest, trusting anyone with super-type rights is dangerous, especially if you only ask for money.

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

Offline lavacano201014

  • Jr. Member
  • **
  • Posts: 83
  • Karma: 9
  • Archbishop of Cristina Scabbia worship
Re: Higher Levels Can't Tweak Superadmins
« Reply #5 on: July 02, 2009, 10:15:36 pm »
To be perfectly honest, trusting anyone with super-type rights is dangerous, especially if you only ask for money.

There's a good system in place:

1) First, get regular admin via a system based on trust.
2) Second, if I've had no major issues with you having admin, THEN you are allowed to donate money and get the Super Admin powers.
Circle reasoning works because circle reasoning works because...

  • Print