add perm check
This commit is contained in:
parent
1ac38f26cb
commit
900127dd45
3 changed files with 52 additions and 4 deletions
|
|
@ -13,6 +13,7 @@ import {
|
|||
} from 'src/app/core/models/recipe.model';
|
||||
import { ActionRecord } from 'src/app/shared/actionRecord/actionRecord';
|
||||
import { UserService } from 'src/app/core/services/user.service';
|
||||
import { UserPermissions } from 'src/app/core/auth/userPermissions';
|
||||
|
||||
@Component({
|
||||
selector: 'app-recipe-details',
|
||||
|
|
@ -201,4 +202,8 @@ export class RecipeDetailsComponent implements OnInit {
|
|||
this.repl = repl as never[];
|
||||
this.isValueChanged ||= repl != undefined;
|
||||
}
|
||||
|
||||
isEditable(){
|
||||
return this._userService.getCurrentUser()!.permissions.includes(UserPermissions.EDITOR);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue