func (self *Coordinator) ForceCompaction(user common.User) error { if !user.IsClusterAdmin() { return fmt.Errorf("Insufficient permissions to force a log compaction") } return self.raftServer.ForceLogCompaction() }
func (self *Permissions) AuthorizeDeleteClusterAdmin(user common.User) (ok bool, err common.AuthorizationError) { if !user.IsClusterAdmin() { return false, common.NewAuthorizationError("Insufficient permissions to delete cluster admin") } return true, "" }
func (self *Permissions) AuthorizeChangeClusterAdminPassword(user common.User) (ok bool, err common.AuthorizationError) { if !user.IsClusterAdmin() { return false, common.NewAuthorizationError("Insufficient permissions to change cluster admin password") } return true, "" }
func (self *Permissions) AuthorizeDropDatabase(user common.User) (ok bool, err common.AuthorizationError) { if !user.IsClusterAdmin() { return false, common.NewAuthorizationError("Insufficient permissions to drop database") } return true, "" }