Fix in assigning and updating role of domain admin

This commit is contained in:
pmkuipers 2020-05-23 22:56:55 +02:00
parent abea748129
commit 50f16788f9
4 changed files with 3 additions and 5 deletions

View File

@ -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();
return true;

1
public/js/app.js vendored
View File

@ -75404,7 +75404,6 @@ Vue.component('datetime', vue_datetime__WEBPACK_IMPORTED_MODULE_0__["Datetime"])
*
* ***************/
admin_tidy: function admin_tidy(a) {
// tidy_admininfo(a)
a.changed = {
role: false
};

3
resources/js/app.js vendored
View File

@ -1020,9 +1020,8 @@ Vue.component('datetime',Datetime);
*
* ***************/
admin_tidy: function admin_tidy(a) {
// tidy_admininfo(a)
a.changed = {
role: false
role: false
};
},
admins_list: function admins_list() {

View File

@ -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>
</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-col>
<b-modal