Fixes collection select not updating specific permissions. #274.
This commit is contained in:
parent
e8e6bdc160
commit
2588310129
|
@ -201,7 +201,8 @@
|
|||
<td
|
||||
class="name column-name"
|
||||
:data-colname="$i18n.get('Capability name')">
|
||||
<strong>{{ capability.display_name }}</strong>
|
||||
<!-- <strong>{{ capability.display_name }}</strong> -->
|
||||
<strong>{{ index.replace('%d', selectedCollection) }}</strong>
|
||||
</td>
|
||||
<td
|
||||
class="description column-descritption"
|
||||
|
|
|
@ -7,9 +7,8 @@ export const addCapabilityToRole = (state, {capabilityKey, role}) => {
|
|||
updateRoles[role.slug] = role;
|
||||
Vue.set(state.capabilities[capabilityKey], 'roles', updateRoles)
|
||||
}
|
||||
|
||||
if (state.role && state.role.slug && state.role.slug == role)
|
||||
Vue.set(state.role.capabilities, capabilityKey, true)
|
||||
if (state.role && state.role.slug && state.role.slug == role.slug)
|
||||
state.role = role;
|
||||
};
|
||||
|
||||
export const removeCapabilityFromRole = (state, {capabilityKey, role}) => {
|
||||
|
@ -18,8 +17,8 @@ export const removeCapabilityFromRole = (state, {capabilityKey, role}) => {
|
|||
delete updateRoles[role.slug];
|
||||
Vue.set(state.capabilities[capabilityKey], 'roles', updateRoles)
|
||||
}
|
||||
if (state.role && state.role.slug && state.role.slug == role)
|
||||
delete state.role.capabilities[capabilityKey]
|
||||
if (state.role && state.role.slug && state.role.slug == role.slug)
|
||||
state.role = role;
|
||||
};
|
||||
|
||||
export const setRoles = (state, roles) => {
|
||||
|
|
Loading…
Reference in New Issue