Source-Python-Dev-Team / Source.Python

This plugin aims to use boost::python and create an easily accessible wrapper around the Source Engine API for scripter use.
http://forums.sourcepython.com
GNU General Public License v3.0
163 stars 31 forks source link

Way to strip a player's specific permissions/parents from the guest group. #364

Open CookStar opened 3 years ago

CookStar commented 3 years ago

Guest groups in auth are very useful, however it is very difficult to strip certain permissions/parents from the guest group.

The guest group is expected to set permissions over features that would be available to all players, but there is no way to deal with players who abuse that feature. So the ability to revoke certain permissions in a guest group from certain players seems to be useful.

Example: When you want to strip only say2 from a particular player. Code: parents.json

{
    "guest": {
        "permissions": [
            "say",
            "say2"
        ]
    }
}

It is very difficult to strip permissions from this state.

You cannot strip the guest because say will not work.(i.e. sp auth permission player remove_parent player guest) You cannot strip say2 because say2 on the guest will still work.(i.e. sp auth permission player remove player say2)

In order to strip say2 you need to strip the guest and then add a say. sp auth permission player remove_parent player guest sp auth permission player add player say

However, this breaks the functionality of the guest group, because the newly added permissions/parents to the guest will no longer function with this player.

Right now, I don't have any working code, but I'm thinking of something that would negate the guest group, Code: negate_group.json

{
    "STEAM_1:0:0": {
        "permissions": [
            "say2"
        ]
    }
}

Or create a setting value that negates the permissions/parents itself. Code: players.json

{
    "STEAM_1:0:0": {
        "negates": {
            "permissions": [
                "say2"
            ]
        }
    }
}

What do you all think?