-
Notifications
You must be signed in to change notification settings - Fork 69
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* clean up workflow actions * better i18n string name * fix batch action checks * fix tests * add integration tests
- Loading branch information
1 parent
ce6e2b7
commit 9616d0e
Showing
13 changed files
with
535 additions
and
209 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,14 @@ | ||
import type { CoreUser } from '$lib/models/core-user'; | ||
import type { Settings } from '$lib/types/global'; | ||
|
||
export const workflowCancelEnabled = (settings: Settings): boolean => { | ||
return !settings.disableWriteActions && !settings.workflowCancelDisabled; | ||
export const workflowCancelEnabled = ( | ||
settings: Settings, | ||
coreUser: CoreUser, | ||
namespace: string, | ||
): boolean => { | ||
return ( | ||
!settings.disableWriteActions && | ||
!settings.workflowCancelDisabled && | ||
!coreUser.namespaceWriteDisabled(namespace) | ||
); | ||
}; |
Oops, something went wrong.