IO-2893 Correct RBACs for editing tickets
Signed-off-by: Allan Carr <allan.carr@thinkimex.com>
This commit is contained in:
@@ -254,24 +254,41 @@ export function TimeTicketList({
|
||||
timeticket: record
|
||||
}}
|
||||
disabled={
|
||||
record.committed_at
|
||||
? HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:editcommitted"
|
||||
}) &&
|
||||
HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:shiftedit"
|
||||
})
|
||||
: HasRbacAccess({
|
||||
record.ciecacode
|
||||
? record.committed_at
|
||||
? HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:editcommitted"
|
||||
}) &&
|
||||
HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:edit"
|
||||
})
|
||||
: HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:edit"
|
||||
})
|
||||
: record.committed_at
|
||||
? HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:editcommitted"
|
||||
}) &&
|
||||
HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:shiftedit"
|
||||
})
|
||||
? disabled
|
||||
: !record.jobid
|
||||
: HasRbacAccess({
|
||||
bodyshop,
|
||||
authLevel: authLevel,
|
||||
action: "timetickets:shiftedit"
|
||||
})
|
||||
? disabled
|
||||
: !record.jobid
|
||||
}
|
||||
>
|
||||
<EditFilled />
|
||||
|
||||
Reference in New Issue
Block a user