Skip to content

Commit

Permalink
Permissions fix (#134)
Browse files Browse the repository at this point in the history
* isOwner update
  • Loading branch information
sei-tspencer committed Apr 11, 2024
1 parent 3f3c96c commit 1739d16
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "blueprint-ui",
"version": "1.0.3-rc1",
"version": "1.0.4",
"scripts": {
"ng": "ng",
"start": "ng serve",
Expand Down
4 changes: 2 additions & 2 deletions src/app/components/landing/manage/manage.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Released under a MIT (SEI)-style license, please see LICENSE.md in the
project root for license information or contact permission@sei.cmu.edu for full terms.
-->
<div class="top-container background" *ngIf="msel.id && (isMselOwner || (isContentDeveloper$ | async))">
<div class="top-container background" *ngIf="msel.id && (msel.hasRole(loggedInUserId, null).owner || (isContentDeveloper$ | async))">
<app-topbar
*ngIf="!hideTopbar"
[title]="topbarText"
Expand Down Expand Up @@ -75,7 +75,7 @@ <h1>This event has ended</h1>
</mat-card>
</div>

<div class="nothing-to-see-here background" *ngIf="!msel.id || !(isMselOwner || (isContentDeveloper$ | async))">
<div class="nothing-to-see-here background" *ngIf="!(msel.id && (msel.hasRole(loggedInUserId, null).owner || (isContentDeveloper$ | async)))">
<h1>You have nothing to manage.</h1>
<h2>If you believe you should have permissions to manage this event, contact you administrator.</h2>
</div>
2 changes: 0 additions & 2 deletions src/app/components/landing/manage/manage.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ export class ManageComponent implements OnDestroy {
startTime = new Date();
endTime = new Date();
loggedInUserId = '';
isMselOwner = false;
isContentDeveloper$ = this.userDataService.isContentDeveloper;
private unsubscribe$ = new Subject();

Expand Down Expand Up @@ -89,7 +88,6 @@ export class ManageComponent implements OnDestroy {
this.endTime = new Date(this.startTime.getTime() + (this.msel.durationSeconds * 1000));
this.invitationDataService.loadByMsel(msel.id);
this.teamDataService.loadByMsel(mselId);
this.isMselOwner = this.msel.hasRole(this.loggedInUserId, null).owner;
}
});
// set appTitle and topbarText for top level
Expand Down

0 comments on commit 1739d16

Please sign in to comment.