Removing roles
fungl164 opened this issue · 1 comments
fungl164 commented
Hi,
Right now it is not possible to remove or reset role definitions. It would be awesome to have the following utility functions if possible:
// Remove role definitions
func (role *Role) Remove(name string) {
delete(role.definitions, name)
}
// Reset role definitions
func (role *Role) Reset() {
role.definitions = map[string]func(req *http.Request, currentUser interface{}) bool{}
}
Msny Thnxs!
jinzhu commented
I think it is not necessary to remove a defined name, you could just create another roles set.