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> {
|
async getDesignerById(id: number): Promise<Designer> {
|
||||||
ScopeAccess.validate(this.user).some([
|
|
||||||
Scopes.DESIGNERS_READ,
|
|
||||||
Scopes.DESIGNERS_PUBLIC_READ,
|
|
||||||
]);
|
|
||||||
return this.loader.load(id);
|
return this.loader.load(id);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -49,7 +45,10 @@ export class DesignerAPI extends BaseSQLDataSource {
|
|||||||
limit: number = 5000,
|
limit: number = 5000,
|
||||||
ids?: number[],
|
ids?: number[],
|
||||||
): Promise<Array<Designer>> {
|
): Promise<Array<Designer>> {
|
||||||
ScopeAccess.validate(this.user).all([Scopes.DESIGNERS_READ]);
|
ScopeAccess.validate(this.user).some([
|
||||||
|
Scopes.DESIGNERS_READ,
|
||||||
|
Scopes.DESIGNERS_PUBLIC_READ,
|
||||||
|
]);
|
||||||
return (
|
return (
|
||||||
this.knex
|
this.knex
|
||||||
.select(
|
.select(
|
||||||
|
|||||||
Reference in New Issue
Block a user