| kumaran.m | 3b4814a | 2020-05-01 19:48:54 +0530 | [diff] [blame] | 1 | /* |
| 2 | Copyright 2020 TATA ELXSI |
| 3 | |
| 4 | Licensed under the Apache License, Version 2.0 (the 'License'); |
| 5 | you may not use this file except in compliance with the License. |
| 6 | You may obtain a copy of the License at |
| 7 | |
| 8 | http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | |
| 10 | Unless required by applicable law or agreed to in writing, software |
| 11 | distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | See the License for the specific language governing permissions and |
| 14 | limitations under the License. |
| 15 | |
| 16 | Author: KUMARAN M (kumaran.m@tataelxsi.co.in), RAJESH S (rajesh.s@tataelxsi.co.in), BARATH KUMAR R (barath.r@tataelxsi.co.in) |
| 17 | */ |
| 18 | /** |
| 19 | * @file Model for role related information. |
| 20 | */ |
| 21 | |
| 22 | /** Interface for ProjectDetails */ |
| 23 | export interface RoleDetails { |
| 24 | _admin?: Admin; |
| 25 | _id?: string; |
| 26 | name?: string; |
| 27 | id?: string; |
| 28 | permissions?: {}; |
| 29 | } |
| 30 | |
| 31 | /** Interface for Admin */ |
| 32 | interface Admin { |
| 33 | created: number; |
| 34 | modified: number; |
| 35 | } |
| 36 | /** Interface for Role data in smarttable */ |
| 37 | export interface RoleData { |
| 38 | name: string; |
| 39 | identifier: string; |
| 40 | modified: string; |
| 41 | created: string; |
| 42 | permissions: {}; |
| 43 | } |
| 44 | /** Interface for Role configuration from role config file */ |
| 45 | export interface RoleConfig { |
| 46 | rolePermissions: PermissionGroup[]; |
| 47 | } |
| 48 | /** Interface for Role permission group */ |
| 49 | export interface PermissionGroup { |
| 50 | title: string; |
| 51 | permissions: Permission[]; |
| 52 | } |
| 53 | /** Interface for Role permission group */ |
| 54 | export interface Permission { |
| 55 | operation: string; |
| 56 | value: string | boolean; |
| 57 | } |