mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-10 06:41:53 +00:00
Implemented a command to clear a level's permissions
This commit is contained in:
parent
4d332c36a0
commit
d5f051890a
1 changed files with 17 additions and 1 deletions
|
@ -166,6 +166,20 @@ function commandAclCopyLevelPermissions(levelId, newLevelId)
|
|||
et.G_Print("copied permissions from "..levelId.." to "..newLevelId.."\n")
|
||||
end
|
||||
|
||||
function commandAclRemoveLevelPermissions(levelId)
|
||||
local levelId = tonumber(levelId)
|
||||
|
||||
if not levelId or not acl.isLevel(levelId) then
|
||||
et.G_Print("usage: acl removepermissions [id]\n")
|
||||
|
||||
return true
|
||||
end
|
||||
|
||||
acl.removeLevelPermissions(levelId)
|
||||
|
||||
et.G_Print("removed permissions from "..levelId.."\n")
|
||||
end
|
||||
|
||||
function commandAcl(command, action, ...)
|
||||
if action == "listlevels" then
|
||||
return commandAclListLevels(...)
|
||||
|
@ -185,8 +199,10 @@ function commandAcl(command, action, ...)
|
|||
return commandAclRemoveLevelPermission(...)
|
||||
elseif action == "copypermissions" then
|
||||
return commandAclCopyLevelPermissions(...)
|
||||
elseif action == "removepermissions" then
|
||||
return commandAclRemoveLevelPermissions(...)
|
||||
else
|
||||
et.G_Print("usage: acl [listlevels|addlevel|removelevel|relevel|listpermissions|isallowed|addpermission|removepermission|copypermissions]")
|
||||
et.G_Print("usage: acl [listlevels|addlevel|removelevel|relevel|listpermissions|isallowed|addpermission|removepermission|copypermissions|removepermissions]")
|
||||
end
|
||||
|
||||
return true
|
||||
|
|
Loading…
Reference in a new issue