mirror of
https://github.com/grafana/grafana.git
synced 2026-08-12 06:05:02 -05:00
Forbid creation of dashboard permissions with both a user and a team (#40104)
These permissions could be created through the API but would not show correctly in the UI.
This commit is contained in:
@@ -24,11 +24,12 @@ func (p PermissionType) String() string {
|
||||
|
||||
// Typed errors
|
||||
var (
|
||||
ErrDashboardAclInfoMissing = errors.New("user id and team id cannot both be empty for a dashboard permission")
|
||||
ErrDashboardPermissionDashboardEmpty = errors.New("dashboard id must be greater than zero for a dashboard permission")
|
||||
ErrFolderAclInfoMissing = errors.New("user id and team id cannot both be empty for a folder permission")
|
||||
ErrFolderPermissionFolderEmpty = errors.New("folder id must be greater than zero for a folder permission")
|
||||
ErrPermissionsWithRoleNotAllowed = errors.New("team and user permissions cannot have an associated role")
|
||||
ErrDashboardAclInfoMissing = errors.New("user id and team id cannot both be empty for a dashboard permission")
|
||||
ErrDashboardPermissionDashboardEmpty = errors.New("dashboard id must be greater than zero for a dashboard permission")
|
||||
ErrFolderAclInfoMissing = errors.New("user id and team id cannot both be empty for a folder permission")
|
||||
ErrFolderPermissionFolderEmpty = errors.New("folder id must be greater than zero for a folder permission")
|
||||
ErrPermissionsWithRoleNotAllowed = errors.New("permissions cannot have both a user and team")
|
||||
ErrPermissionsWithUserAndTeamNotAllowed = errors.New("team and user permissions cannot have an associated role")
|
||||
)
|
||||
|
||||
// Dashboard ACL model
|
||||
|
||||
Reference in New Issue
Block a user