File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -600,6 +600,11 @@ DubAPI.prototype.isResidentDJ = function(user) {
600600 return user . role === roles [ 'resident-dj' ] . id ;
601601} ;
602602
603+ DubAPI . prototype . isDJ = function ( user ) {
604+ if ( ! this . _ . connected || user === undefined ) return false ;
605+ return user . role === roles [ 'dj' ] . id ;
606+ } ;
607+
603608DubAPI . prototype . isStaff = function ( user ) {
604609 if ( ! this . _ . connected || user === undefined ) return false ;
605610 return user . role !== null ;
Original file line number Diff line number Diff line change @@ -76,4 +76,13 @@ roles['resident-dj'] = roles['5615feb8e596154fc2000002'] = {
7676 ]
7777} ;
7878
79+ roles [ 'dj' ] = roles [ '564435423f6ba174d2000001' ] = {
80+ id : '564435423f6ba174d2000001' ,
81+ type : 'dj' ,
82+ label : 'DJ' ,
83+ rights : [
84+ 'set-dj'
85+ ]
86+ } ;
87+
7988module . exports = roles ;
You can’t perform that action at this time.
0 commit comments