c727743741e97405555662b4abd0301dbad1888d
[yaffs-website] / web / modules / contrib / permissions_by_term / js / src / model / permission-output.prototype.js
1 let PermissionOutput = function() {
2   this.roles = [];
3   this.usernames = [];
4 }
5
6 /**
7  * @returns array
8  */
9 PermissionOutput.prototype.getUsernames = function() {
10   return this.usernames;
11 }
12
13 /**
14  * @returns array
15  */
16 PermissionOutput.prototype.getRoles = function() {
17   return this.roles;
18 }
19
20 /**
21  * @returns array
22  */
23 PermissionOutput.prototype.addUsername = function(username) {
24   return this.usernames.push(username);
25 }
26
27 /**
28  * @returns array
29  */
30 PermissionOutput.prototype.addRole = function(role) {
31   return this.roles.push(role);
32 }
33
34 export default PermissionOutput;