-
Notifications
You must be signed in to change notification settings - Fork 60
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c5596c8
commit 8971fdb
Showing
5 changed files
with
68 additions
and
50 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,66 @@ | ||
import { EdaCredential } from '../../frontend/eda/interfaces/EdaCredential'; | ||
import { EdaDecisionEnvironment } from '../../frontend/eda/interfaces/EdaDecisionEnvironment'; | ||
import { EdaProject } from '../../frontend/eda/interfaces/EdaProject'; | ||
import { EdaRulebookActivation } from '../../frontend/eda/interfaces/EdaRulebookActivation'; | ||
import { EdaCredentialType } from '../../frontend/eda/interfaces/EdaCredentialType'; | ||
|
||
export enum SERVER_NAME { | ||
AWX_SERVER = 'AWX Ansible Server', | ||
EDA_SERVER = 'Event Driven Automation Server', | ||
HUB_SERVER = 'Automation Hub', | ||
GALAXY_SERVER = 'Galaxy Server', | ||
} | ||
|
||
export const user_team_access_tab_resources = [ | ||
type ResourceObject = | ||
| EdaProject | ||
| EdaDecisionEnvironment | ||
| EdaRulebookActivation | ||
| EdaCredential | ||
| EdaCredentialType; | ||
|
||
export interface AccessTabResource { | ||
name: string; | ||
content_type: string; | ||
creation: (() => Cypress.Chainable<ResourceObject>) | null; | ||
deletion: (resourceObject: ResourceObject) => Cypress.Chainable<void>; | ||
role: string; | ||
} | ||
export const user_team_access_tab_resources: AccessTabResource[] = [ | ||
{ | ||
name: 'projects', | ||
content_type: 'eda.project', | ||
creation: cy.createEdaProject, | ||
deletion: cy.deleteEdaProject, | ||
creation: () => cy.createEdaProject() as Cypress.Chainable<ResourceObject>, | ||
deletion: (resourceObject) => cy.deleteEdaProject(resourceObject as EdaProject), | ||
role: 'Project Admin', | ||
}, | ||
{ | ||
name: 'decision-environments', | ||
content_type: 'eda.project', | ||
creation: cy.createEdaDecisionEnvironment, | ||
deletion: cy.deleteEdaDecisionEnvironment, | ||
creation: () => cy.createEdaDecisionEnvironment() as Cypress.Chainable<ResourceObject>, | ||
deletion: (resourceObject) => | ||
cy.deleteEdaDecisionEnvironment(resourceObject as EdaDecisionEnvironment), | ||
role: 'Decision Environment Admin', | ||
}, | ||
{ | ||
name: 'rulebook-activations', | ||
content_type: 'eda.activation', | ||
creation: cy.createEdaRulebookActivation, | ||
deletion: cy.deleteEdaRulebookActivation, | ||
creation: null, | ||
deletion: (resourceObject) => | ||
cy.deleteEdaRulebookActivation(resourceObject as EdaRulebookActivation), | ||
role: 'Activation Admin', | ||
}, | ||
{ | ||
name: 'credentials', | ||
content_type: 'eda.edacredential', | ||
creation: cy.createEdaCredential, | ||
deletion: cy.deleteEdaCredential, | ||
creation: () => cy.createEdaCredential() as Cypress.Chainable<ResourceObject>, | ||
deletion: (resourceObject) => cy.deleteEdaCredential(resourceObject as EdaCredential), | ||
role: 'Eda Credential Admin', | ||
}, | ||
{ | ||
name: 'credential-types', | ||
content_type: 'eda.credentialtype', | ||
creation: cy.createEdaCredentialType, | ||
deletion: cy.deleteEdaCredentialType, | ||
creation: () => cy.createEdaCredentialType() as Cypress.Chainable<ResourceObject>, | ||
deletion: (resourceObject) => cy.deleteEdaCredentialType(resourceObject as EdaCredentialType), | ||
role: 'Credential Type Admin', | ||
}, | ||
]; |
Empty file.