func (permission *Permission) Allow(mode PermissionMode, roles ...string) *Permission {
	if mode == CRUD {
		return permission.Allow(Create, roles...).Allow(Update, roles...).Allow(Read, roles...).Allow(Delete, roles...)
	}

	if permission.AllowedRoles[mode] == nil {
		permission.AllowedRoles[mode] = []string{}
	}
	permission.AllowedRoles[mode] = append(permission.AllowedRoles[mode], roles...)
	return permission
}
func (permission *Permission) Allow(mode PermissionMode, roles ...string) *Permission {
	if mode == CRUD {
		return permission.Allow(Create, roles...).Allow(Update, roles...).Allow(Read, roles...).Allow(Delete, roles...)
	}

	if permission.AllowedRoles[mode] == nil {
		permission.AllowedRoles[mode] = []string{}
	}
	permission.AllowedRoles[mode] = append(permission.AllowedRoles[mode], roles...)
	return permission
}
func ( permission * Permission ) Allow ( mode PermissionMode , roles ... string ) * Permission { if mode == CRUD { return permission . Allow ( Create , roles ... ) . Allow ( Update , roles ... ) . Allow ( Read , roles ... ) . Allow ( Delete , roles ... ) } if permission . AllowedRoles [ mode ] == nil { permission . AllowedRoles [ mode ] = [ ] string { } } permission . AllowedRoles [ mode ] = append ( permission . AllowedRoles [ mode ] , roles ... ) return permission }
// Allow allows permission mode for roles
Allow allows permission mode for roles