blob: 202513495d365d12bef859ceba46e9560dc231cb [file] [log] [blame]
export class PermissionsModel {
public reader: boolean = false;
public writer: boolean = false;
public admin: boolean = false;
/**
*Creates an instance of Product.
* @param {*} [data=null]
* @memberof Product
*/
public constructor(data: string[] = null) {
if (!!data) {
data.forEach((permissionItem: string) => {
switch (permissionItem) {
case 'kon-admin':
this.admin = true;
break;
case 'kon-writer':
this.writer = true;
break;
case 'kon-reader':
this.reader = true;
break;
default:
break;
}
});
}
}
}