Wait, it's set to authlevel > 1 though, so because I am at auth level one it shouldn't make a difference when using it with modid surely?
Trouble modifying Kits plugin with permissions
Discussion in 'Rust Development' started by Twistedwheel, Apr 21, 2016.
-
Wulf Community Admin
-
Here's the snippet I used on "/kit help". It's literally no different from any of section of code.
Code:if ((!hasPermission(player, "kits.useadminkits")) & (!hasPermission(player, "kits.useallkits"))) { return;}
-
Wulf Community Admin
I don't know then, I'm just reading what you showed me. Your hasPermission check will always return true if you have auth level 1 or 2, it won't make it to the actual permissions check.
-
-
Wulf Community Admin
-
I think it's literally something wrong with "kits.useadminkits" as I removed my auth and as a guest I had full access, but after removing the perm I had no access again.
Edit: The permission bool is at 1027 and the config is several lines below it.
[DOUBLEPOST=1461286960][/DOUBLEPOST]Any progress? Still not managed to figure out any issue on this end, it's weird. -
Wulf Community Admin
-
Edit: Didn't want to double-post but I have it running on a generic oxide server if it makes it easier to look at.Last edited by a moderator: Apr 22, 2016 -
It made more sense to me creating this then extending my previous post as it is a separate issue. Anyway, backstory.
Got two registered permissions, "kits.canuseadmin" and "kits.canuseall". The first limits the user to viewing and using "Player Commands" and "Admin Commands" under the "/kits help" list, and the other grants full access. Currently, both permissions are correctly registered, and granting kits.canuseadmin" restricts the "/kit help" list as it should. This is on an authlevel 0 account. I have no permission.
The issue is that granting the "kits.canuseadmin" permission actually gives full access even though the help is blocked using the same commands that I used to block command usage. Anyway, any help or advise would be amazing. I will attach the code at the bottom.Attached Files:
-
-
Wulf Community Admin
-
Ah right, sorry. Much appreciated. Just in a hurry to push it out as we want to be able to use it in the next week!
-
Wulf Community Admin
Attached Files:
-
-
[DOUBLEPOST=1461432445,1461418497][/DOUBLEPOST] -
Wulf Community Admin
-
-
Wulf Community Admin
-
These are the checks used in the original kits, modified to use permissions. If I don't have any permissions the checks seem to work properly.
Code:case "give": if (!hasPermission(player, "kits.useadminkits") && !hasPermission(player, "kits.useallkits")) { SendReply(player, NoAccess); return; } SendReply(player, "/kit give PLAYER/STEAMID KITNAME"); break;
-
Wulf Community Admin
-