Crosschat.Server.Domain.Entities.User.UnBan C# (CSharp) Method

UnBan() public method

public UnBan ( User actor ) : void
actor User
return void
        public void UnBan(User actor)
        {
            if (actor.Role != UserRole.Moderator && actor.Role != UserRole.Admin)
                throw new ModeratorsRightsRequiredException();

            if (Role == UserRole.Admin || Role == UserRole.Moderator)
                throw new ModeratorsRightsRequiredException();

            IsBanned = false;
        }