mirror of
https://github.com/bpatrik/pigallery2.git
synced 2024-11-28 08:58:49 +02:00
test fix
This commit is contained in:
parent
4891eed7b3
commit
f99e13f3fc
@ -1,7 +1,8 @@
|
||||
import {UserDTO, UserRoles} from '../../../../common/entities/UserDTO';
|
||||
import {Column, Entity, PrimaryGeneratedColumn} from 'typeorm';
|
||||
import {Column, Entity, PrimaryGeneratedColumn, Unique} from 'typeorm';
|
||||
|
||||
@Entity()
|
||||
@Unique(['name'])
|
||||
export class UserEntity implements UserDTO {
|
||||
|
||||
@PrimaryGeneratedColumn()
|
||||
|
@ -27,6 +27,9 @@ export module UserDTO {
|
||||
}
|
||||
for (let i = 0; i < permissions.length; i++) {
|
||||
let permission = permissions[i];
|
||||
if (permissions[i] === separator + '*') {
|
||||
return true;
|
||||
}
|
||||
if (permission[permission.length - 1] === '*') {
|
||||
permission = permission.slice(0, -1);
|
||||
if (path.startsWith(permission) && (!path[permission.length] || path[permission.length] === separator)) {
|
||||
|
Loading…
Reference in New Issue
Block a user