🚀Bumped version to v0.4.5
This commit is contained in:
parent
b9aac71676
commit
cc869f69ad
2508
CHANGELOG.md
2508
CHANGELOG.md
File diff suppressed because it is too large
Load Diff
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "@odit/lfk-backend",
|
||||
"version": "0.4.4",
|
||||
"version": "0.4.5",
|
||||
"main": "src/app.ts",
|
||||
"repository": "https://git.odit.services/lfk/backend",
|
||||
"author": {
|
||||
|
|
|
@ -1,43 +1,43 @@
|
|||
import {
|
||||
IsArray,
|
||||
IsOptional
|
||||
} from "class-validator";
|
||||
import { UserGroup } from '../entities/UserGroup';
|
||||
import { ResponseObjectType } from '../enums/ResponseObjectType';
|
||||
import { IResponse } from './IResponse';
|
||||
import { ResponsePermission } from './ResponsePermission';
|
||||
|
||||
/**
|
||||
* Defines the group permission response (get /api/groups/:id/permissions).
|
||||
*/
|
||||
export class ResponseUserGroupPermissions implements IResponse {
|
||||
/**
|
||||
* The responseType.
|
||||
* This contains the type of class/entity this response contains.
|
||||
*/
|
||||
responseType: ResponseObjectType = ResponseObjectType.USERPERMISSIONS;
|
||||
|
||||
/**
|
||||
* The permissions directly granted to the group.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
directlyGranted: ResponsePermission[] = new Array<ResponsePermission>();
|
||||
|
||||
/**
|
||||
* Is just here for compatability.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
inherited: ResponsePermission[] = new Array<ResponsePermission>();
|
||||
|
||||
/**
|
||||
* Creates a ResponseUserPermissions object from a group.
|
||||
* @param group The group the response shall be build for.
|
||||
*/
|
||||
public constructor(group: UserGroup) {
|
||||
for (let permission of group.permissions) {
|
||||
this.directlyGranted.push(permission.toResponse());
|
||||
}
|
||||
}
|
||||
}
|
||||
import {
|
||||
IsArray,
|
||||
IsOptional
|
||||
} from "class-validator";
|
||||
import { UserGroup } from '../entities/UserGroup';
|
||||
import { ResponseObjectType } from '../enums/ResponseObjectType';
|
||||
import { IResponse } from './IResponse';
|
||||
import { ResponsePermission } from './ResponsePermission';
|
||||
|
||||
/**
|
||||
* Defines the group permission response (get /api/groups/:id/permissions).
|
||||
*/
|
||||
export class ResponseUserGroupPermissions implements IResponse {
|
||||
/**
|
||||
* The responseType.
|
||||
* This contains the type of class/entity this response contains.
|
||||
*/
|
||||
responseType: ResponseObjectType = ResponseObjectType.USERPERMISSIONS;
|
||||
|
||||
/**
|
||||
* The permissions directly granted to the group.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
directlyGranted: ResponsePermission[] = new Array<ResponsePermission>();
|
||||
|
||||
/**
|
||||
* Is just here for compatability.
|
||||
*/
|
||||
@IsArray()
|
||||
@IsOptional()
|
||||
inherited: ResponsePermission[] = new Array<ResponsePermission>();
|
||||
|
||||
/**
|
||||
* Creates a ResponseUserPermissions object from a group.
|
||||
* @param group The group the response shall be build for.
|
||||
*/
|
||||
public constructor(group: UserGroup) {
|
||||
for (let permission of group.permissions) {
|
||||
this.directlyGranted.push(permission.toResponse());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue