HOTFIX: fixed scopes for designers (#145)
This commit is contained in:
@@ -21,10 +21,6 @@ export class DesignerAPI extends BaseSQLDataSource {
|
||||
}
|
||||
|
||||
async getDesignerById(id: number): Promise<Designer> {
|
||||
ScopeAccess.validate(this.user).some([
|
||||
Scopes.DESIGNERS_READ,
|
||||
Scopes.DESIGNERS_PUBLIC_READ,
|
||||
]);
|
||||
return this.loader.load(id);
|
||||
}
|
||||
|
||||
@@ -49,7 +45,10 @@ export class DesignerAPI extends BaseSQLDataSource {
|
||||
limit: number = 5000,
|
||||
ids?: number[],
|
||||
): Promise<Array<Designer>> {
|
||||
ScopeAccess.validate(this.user).all([Scopes.DESIGNERS_READ]);
|
||||
ScopeAccess.validate(this.user).some([
|
||||
Scopes.DESIGNERS_READ,
|
||||
Scopes.DESIGNERS_PUBLIC_READ,
|
||||
]);
|
||||
return (
|
||||
this.knex
|
||||
.select(
|
||||
|
||||
Reference in New Issue
Block a user