1. 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?
     
  2. Wulf

    Wulf Community Admin

    The way you have it now... is that if you are auth level 1 or higher (moderator or owner), you will be able to use ALL of it, regardless of permissions.
     
  3. I don't think it's doing that... I revoked access to "kits.useadminkits" and kept my auth level at one and the section of "/kit help" that is based on the permissions system still locks me out of it as it should.

    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;}
     
  4. Wulf

    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.
     
  5. Would it be possible for you to have a look? If you have time, of course. I can upload the file.
     
  6. Wulf

    Wulf Community Admin

    Feel free to upload it, I'll try to take a look.
     
  7. 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.
     
  8. Wulf

    Wulf Community Admin

    Not yet, I'll have to take a look later today after some sleep.
     
  9. You get a look at it? Had another look and trying using multiple permission bools but it didn't make a difference.

    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
  10. 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:

    • kits.cs
      File size:
      43.7 KB
      Views:
      16
  11. Wulf

    Wulf Community Admin

    This history is here, it's still the same issue. No need to create a new thread and split the discussion between them. The issue is not with the registering of the permissions, it's with the check. I'd need to test and see what exactly is wrong though with it.

    I haven't had a chance to look yet, my dev machine has been having issues so I haven't been able to do much testing. I'll try to take a look at it tonight after I get back from town.
     
  12. 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!
     
  13. Wulf

    Wulf Community Admin

    Could you try the below version please? I haven't tested it.
     

    Attached Files:

    • Kits.cs
      File size:
      43.5 KB
      Views:
      15
  14. Working til 6 so I shall try then. Thank you!
    [DOUBLEPOST=1461432445,1461418497][/DOUBLEPOST]
    It still blocks the "Server Admin" commands section of "/help" as it should, but I can still run the commands in that list as they aren't limited.
     
  15. Wulf

    Wulf Community Admin

    Ah, I see why... you aren't actually doing permission checks on the actual commands, just the help text. ;)
     
  16. There are checks on the commands too :( They were already in place from the original plugin
     
  17. Wulf

    Wulf Community Admin

    From what I saw in your last file, there were no checks on the actual commands, just the help.
     
  18. 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;
     
  19. Wulf

    Wulf Community Admin

    That's just help, not the actual command handling.
     
  20. What would you recommend? Really not good with C#.