Fix in assigning and updating role of domain admin
This commit is contained in:
parent
abea748129
commit
50f16788f9
|
@ -179,7 +179,7 @@ class VMailController extends Controller
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$domain->users()->attach($validatedData['userid'],['role' => $validatedData['userid']]);
|
$domain->users()->attach($validatedData['userid'],['role' => $validatedData['role']]);
|
||||||
$domain->save();
|
$domain->save();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
|
|
1
public/js/app.js
vendored
1
public/js/app.js
vendored
|
@ -75404,7 +75404,6 @@ Vue.component('datetime', vue_datetime__WEBPACK_IMPORTED_MODULE_0__["Datetime"])
|
||||||
*
|
*
|
||||||
* ***************/
|
* ***************/
|
||||||
admin_tidy: function admin_tidy(a) {
|
admin_tidy: function admin_tidy(a) {
|
||||||
// tidy_admininfo(a)
|
|
||||||
a.changed = {
|
a.changed = {
|
||||||
role: false
|
role: false
|
||||||
};
|
};
|
||||||
|
|
3
resources/js/app.js
vendored
3
resources/js/app.js
vendored
|
@ -1020,9 +1020,8 @@ Vue.component('datetime',Datetime);
|
||||||
*
|
*
|
||||||
* ***************/
|
* ***************/
|
||||||
admin_tidy: function admin_tidy(a) {
|
admin_tidy: function admin_tidy(a) {
|
||||||
// tidy_admininfo(a)
|
|
||||||
a.changed = {
|
a.changed = {
|
||||||
role: false
|
role: false
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
admins_list: function admins_list() {
|
admins_list: function admins_list() {
|
||||||
|
|
|
@ -360,7 +360,7 @@ window.InitialState.IsSiteAdmin = @json(Auth::user()->hasRole('admin'));
|
||||||
<strong v-else>@{{{'own':'Owner','edit': 'Manager','view': 'Viewer',}[a.pivot.role]}}</strong>
|
<strong v-else>@{{{'own':'Owner','edit': 'Manager','view': 'Viewer',}[a.pivot.role]}}</strong>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-col>
|
<b-col>
|
||||||
<b-button v-if='(isSiteAdmin || domainRole == "own") && a.id != user.id' @click='admin_update(a,$event)' size='sm' variant='primary':disabled='a.changed.role == false'><i class='fas fa-pen'></i></b-button>
|
<b-button v-if='(isSiteAdmin || domainRole == "own") && a.id != user.id' @click='admin_update(a,$event)' size='sm' variant='primary' :disabled='a.changed.role == false'><i class='fas fa-pen'></i></b-button>
|
||||||
<b-button v-if='(isSiteAdmin || domainRole == "own") && a.id != user.id' v-b-modal="'delete-adm-modal-'+a.id"size='sm' variant='danger'><i class='fas fa-trash'></i></b-button>
|
<b-button v-if='(isSiteAdmin || domainRole == "own") && a.id != user.id' v-b-modal="'delete-adm-modal-'+a.id"size='sm' variant='danger'><i class='fas fa-trash'></i></b-button>
|
||||||
</b-col>
|
</b-col>
|
||||||
<b-modal
|
<b-modal
|
||||||
|
|
Loading…
Reference in New Issue
Block a user