mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
edit node permission (#261)
This commit is contained in:
committed by
suzanadirla
parent
56ddeb8c40
commit
ded29aee4d
@@ -346,4 +346,40 @@ describe('PageComponent', () => {
|
||||
expect(component.canMoveShared(selection)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('canUpdate()', () => {
|
||||
it('should return true if node can be edited', () => {
|
||||
const selection = [ { entry: {
|
||||
allowableOperations: ['update']
|
||||
} } ];
|
||||
|
||||
expect(component.canUpdate(selection)).toBe(true);
|
||||
});
|
||||
|
||||
it(`should return false if node cannot be edited`, () => {
|
||||
const selection = [ { entry: {
|
||||
allowableOperations: ['other-permission']
|
||||
} } ];
|
||||
|
||||
expect(component.canUpdate(selection)).toBe(false);
|
||||
});
|
||||
});
|
||||
|
||||
describe('canUpdateShared()', () => {
|
||||
it('should return true if shared node can be edited', () => {
|
||||
const selection = [ { entry: {
|
||||
allowableOperationsOnTarget: ['update']
|
||||
} } ];
|
||||
|
||||
expect(component.canUpdateShared(selection)).toBe(true);
|
||||
});
|
||||
|
||||
it(`should return false if shared node cannot be edited`, () => {
|
||||
const selection = [ { entry: {
|
||||
allowableOperationsOnTarget: ['other-permission']
|
||||
} } ];
|
||||
|
||||
expect(component.canUpdateShared(selection)).toBe(false);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user