mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-24 17:31:52 +00:00
revert change for AOS related to lock owners
This commit is contained in:
@@ -165,7 +165,7 @@ describe('evaluators', () => {
|
||||
expect(canOpenWithOffice(context)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should return [true] if current user is lock owner', () => {
|
||||
it('should return [false] if current user is lock owner', () => {
|
||||
const context: any = {
|
||||
profile: {
|
||||
id: 'user1'
|
||||
@@ -186,7 +186,7 @@ describe('evaluators', () => {
|
||||
}
|
||||
};
|
||||
|
||||
expect(canOpenWithOffice(context)).toBeTruthy();
|
||||
expect(canOpenWithOffice(context)).toBeFalsy();
|
||||
});
|
||||
|
||||
it('should return [true] if all checks succeed', () => {
|
||||
|
@@ -47,8 +47,12 @@ export function canOpenWithOffice(
|
||||
file.entry.properties['cm:lockType'] === 'WRITE_LOCK' ||
|
||||
file.entry.properties['cm:lockType'] === 'READ_ONLY_LOCK'
|
||||
) {
|
||||
const lockOwner = file.entry.properties['cm:lockOwner'];
|
||||
return lockOwner && lockOwner.id === context.profile.id;
|
||||
return false;
|
||||
}
|
||||
|
||||
const lockOwner = file.entry.properties['cm:lockOwner'];
|
||||
if (lockOwner && lockOwner.id !== context.profile.id) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
|
Reference in New Issue
Block a user