Skip to content

Commit

Permalink
fix: pause causes access permissions [WTEL-4015]
Browse files Browse the repository at this point in the history
  • Loading branch information
dlohvinov committed Dec 12, 2023
1 parent 97739b9 commit fb647ff
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 9 deletions.
4 changes: 0 additions & 4 deletions src/modules/_reusable/app-header/components/app-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -100,10 +100,6 @@ export default {
// and throw user to auth page
return router.replace('/auth');
},
toggleDarkTheme() {
document.documentElement.classList.toggle('theme--dark');
},
},
};
</script>
Expand Down
13 changes: 8 additions & 5 deletions src/modules/permissions/modules/roles/api/roles.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,16 @@ import {
} from '@webitel/ui-sdk/src/api/defaults';
import applyTransform, {
camelToSnake,
merge, notify, snakeToCamel,
starToSearch, log, sanitize,
generateUrl,
merge,
notify,
sanitize,
snakeToCamel,
starToSearch,
} from '@webitel/ui-sdk/src/api/transformers';
import ApplicationsAccess
from '@webitel/ui-sdk/src/modules/Userinfo/classes/ApplicationsAccess';
import deepCopy from 'deep-copy';
import ApplicationsAccess from '@webitel/ui-sdk/src/modules/Userinfo/classes/ApplicationsAccess';
import instance from '../../../../../app/api/instance';

const baseUrl = '/roles';
Expand Down Expand Up @@ -63,7 +67,7 @@ const getRole = async ({ itemId: id }) => {
return copy;
};

const url = `${baseUrl}/${id}`;
const url = `${baseUrl}/${id}?fields=metadata&fields=permissions&fields=name&fields=description`;

try {
const response = await instance.get(url);
Expand Down Expand Up @@ -128,7 +132,6 @@ const addRole = async ({ itemInstance }) => {
const updateRole = async ({ itemInstance, itemId: id }) => {
const item = applyTransform(itemInstance, [
preRequestHandler,
log,
sanitize(fieldsToSend),
camelToSnake(),
]);
Expand Down
3 changes: 3 additions & 0 deletions src/modules/userinfo/store/_internals/scripts/convertScope.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,12 @@ const convertScope = (initialScope) => {
const communications = ObjectsList.find((obj) => obj.name ===
AdminSections.COMMUNICATIONS);
const skills = ObjectsList.find((obj) => obj.name === AdminSections.SKILLS);
const pauseCauses = ObjectsList.find((obj) => obj.name ===
AdminSections.PAUSE_CAUSE);
scope.flow = { ...flow, access: 'rxwd' };
scope.communications = { ...communications, access: 'rxwd' };
scope.skills = { ...skills, access: 'rxwd' };
scope.pauseCauses = { ...pauseCauses, access: 'rxwd' };

return scope;
};
Expand Down

0 comments on commit fb647ff

Please sign in to comment.