oups
This commit is contained in:
@@ -60,6 +60,10 @@ func (a *AuthService) Can(memberRoles []string, action Action, ticket *db.Ticket
|
||||
if ticket == nil {
|
||||
return ""
|
||||
}
|
||||
// Prefer role stored on the ticket itself (populated at open time for DB panels)
|
||||
if ticket.StaffRoleID != "" {
|
||||
return ticket.StaffRoleID
|
||||
}
|
||||
if p, ok := cfg.Panels[ticket.Panel]; ok {
|
||||
if t, ok := p.Types[ticket.Type]; ok {
|
||||
return t.StaffRole
|
||||
|
||||
Reference in New Issue
Block a user