File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 242242 return this .$keycloak && this .$keycloak .idTokenParsed ? this .$keycloak .idTokenParsed .email : ' '
243243 },
244244 is_admin : function () {
245- return this .$keycloak .hasRealmRole (" admin" )
245+ let admin = Vue .prototype .$Config .keycloak .admin
246+ console .log (admin)
247+ return this .$keycloak .hasRealmRole (admin)
246248 }
247249 },
248250 methods: {
Original file line number Diff line number Diff line change 307307 return resultArray
308308 },
309309 is_admin : function () {
310- return this .$keycloak .hasRealmRole (" admin" )
310+ let admin = Vue .prototype .$Config .keycloak .admin
311+ return this .$keycloak .hasRealmRole (admin)
311312 },
312313
313314
Original file line number Diff line number Diff line change 317317 return this .$keycloak && this .$keycloak .idTokenParsed ? this .$keycloak .idTokenParsed .email : ' '
318318 },
319319 is_admin : function () {
320- return this .$keycloak .hasRealmRole (" admin" )
320+ let admin = Vue .prototype .$Config .keycloak .admin
321+ return this .$keycloak .hasRealmRole (admin)
321322 },
322323
323324 spdmodels () {
Original file line number Diff line number Diff line change 116116 return this .$keycloak && this .$keycloak .idTokenParsed ? this .$keycloak .idTokenParsed .preferred_username : ' '
117117 },
118118 is_admin : function () {
119- return this .$keycloak .hasRealmRole (" admin" )
119+ let admin = Vue .prototype .$Config .keycloak .admin
120+ return this .$keycloak .hasRealmRole (admin)
120121 },
121122 },
122123 methods: {
154155 }
155156 // save
156157 if (this .isglobal ) {
157- this .dbrecord .username = " admin"
158+ this .dbrecord .username = Vue . prototype . $Config . keycloak . admin
158159 } else {
159160 this .dbrecord .username = this .username
160161 }
You can’t perform that action at this time.
0 commit comments