Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edit Permissions Dialog shows incorrect content name #4752 #4779

Merged
merged 1 commit into from
Apr 6, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -676,6 +676,8 @@ export class ContentWizardPanel extends api.app.wizard.WizardPanel<Content> {

if (content.getType().isImage()) {
this.updateWizard(content);
} else if (this.isSecurityWizardStepFormAllowed) { // update security wizard to have new path/displayName etc.
this.securityWizardStepForm.update(content);
}

return content;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,26 +14,32 @@ describe('api.security.Principal', () => {

it('given an equal then true is returned', () => {

let principal1 = Principal.create().setKey(PrincipalKey.ofAnonymous()).setDisplayName('Anon').setModifiedTime(now).build();
let principal2 = Principal.create().setKey(PrincipalKey.ofAnonymous()).setDisplayName('Anon').setModifiedTime(now).build();
let principal1: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(
PrincipalKey.ofAnonymous()).setDisplayName('Anon').build();
let principal2: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(
PrincipalKey.ofAnonymous()).setDisplayName('Anon').build();

expect(principal1.equals(principal2)).toBeTruthy();
});

it('given unequal displayName then false is returned', () => {

let principal1 = Principal.create().setKey(PrincipalKey.ofAnonymous()).setDisplayName('Anon').setModifiedTime(now).build();
let principal2 = Principal.create().setKey(PrincipalKey.ofAnonymous()).setDisplayName('Other').setModifiedTime(now).build();
let principal1: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(
PrincipalKey.ofAnonymous()).setDisplayName('Anon').build();
let principal2: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(
PrincipalKey.ofAnonymous()).setDisplayName('Other').build();

expect(principal1.equals(principal2)).toBeFalsy();
});

it('given unequal type then false is returned', () => {

let principal1 = Principal.create().setKey(PrincipalKey.fromString('user:mystore:other')).setDisplayName(
'Anon').setModifiedTime(now).build();
let principal2 = Principal.create().setKey(PrincipalKey.fromString('user:mystore:other')).setDisplayName(
'Anon').setModifiedTime(later).build();
let principal1: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(
PrincipalKey.fromString('user:mystore:other')).setDisplayName(
'Anon').build();
let principal2: Principal = <Principal>Principal.create().setModifiedTime(later).setKey(
PrincipalKey.fromString('user:mystore:other')).setDisplayName(
'Anon').build();

expect(principal1.equals(principal2)).toBeFalsy();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ describe('api.security.acl.AccessControlEntry', () => {

describe('equals', () => {

let principal1 = Principal.create().setKey(PrincipalKey.ofAnonymous()).setDisplayName('principal1').setModifiedTime(now).build();
let principal1: Principal = <Principal>Principal.create().setModifiedTime(now).setKey(PrincipalKey.ofAnonymous()).setDisplayName(
'principal1').build();

it('given an equal then true is returned', () => {

Expand Down