Appears to be giving everyone owner accessNo Thanks

Hello

I just spent alot of time in troubleshooting, asking my team and correcting the Rust Permission because alot of low permission staff and Admins had the ownerid role which for sure should not happen at all. I found that this plugin is responsible for all of this.

            if (restoreInfo.WasAdmin)
            {
                ServerUsers.Set(player.userID, ServerUsers.UserGroup.Owner, "", "");
                player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, true);
                player.Connection.authLevel = 2;
            }​

You give EVERYONE the ownerid role no matter if he had it before or if he had this role at all.
We use trial Admins for example which haven't Rust permissions at all and just can use some commands. And normal admins of course has the moderatorid role and not the owner role.

This is a serious issue and I will disable the Plugin at all until this is fixed.

Regards

Where exactly is it setting ownerid for everyone? The above appears to check if they had admin before, otherwise it won't set it.

As a temporary workaround you can implement that. Since you are not checking on restore Permission if its enabled in the config.

Replace:

            if (restoreInfo.WasAdmin)
            {
                ServerUsers.Set(player.userID, ServerUsers.UserGroup.Owner, "", "");
                player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, true);
                player.Connection.authLevel = 2;
            }​


With:

            if ((restoreInfo.WasAdmin) && (config.RemoveAdminFlag))
            {
                ServerUsers.Set(player.userID, ServerUsers.UserGroup.Moderator, restoreInfo.Name, "");
                player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, true);
                player.Connection.authLevel = 1;
            }​

Regards

Merged post

Hey Wulf

The WasAdmin Flag gets set no matter if the user was moderator oder owner (native rust permissions not oxide permissions). But it always forces it to set it to owner permission after that.

Plus it doesn't checks if this option is enabled anyway. Here you can see that it checks for the config on this:

 

            if (player.IsAdmin && config.RemoveAdminFlag && !isChange)
            {
                ServerUsers.Set(player.userID, ServerUsers.UserGroup.None, "", "");
                player.SetPlayerFlag(BasePlayer.PlayerFlags.IsAdmin, false);
                player.Connection.authLevel = 0;
            }

But on restore the permission it doesn't. It overwrites it in any case no matter of the config value or the real old rust permission the user had.

Locked automatically