Skip to content

Commit

Permalink
fix edit button display?
Browse files Browse the repository at this point in the history
  • Loading branch information
joelclems committed Jan 12, 2024
1 parent 05d991a commit e9de22a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
3 changes: 3 additions & 0 deletions contrib/m_sipaf/config/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -210,6 +210,9 @@ site_details_fields:
items:
- label: Propriétés
items:
- hidden: true
items:
- scope
- title: Informations
display: fieldset
items:
Expand Down
3 changes: 2 additions & 1 deletion frontend/app/services/object.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ export class ModulesObjectService {
return false;
}
const checkAction = this.checkAction(context, action, data?.scope);

return checkAction.actionAllowed;
}

Expand Down Expand Up @@ -323,6 +324,7 @@ export class ModulesObjectService {
};
const pageCode = `${context.object_code}_${pageCodeAction[action]}`;
const pageExists = moduleConfig.pages && Object.keys(moduleConfig.pages).includes(pageCode);

if (!pageExists) {
return {
actionAllowed: null,
Expand Down Expand Up @@ -372,7 +374,6 @@ export class ModulesObjectService {
} else {
testUserCruved = moduleCruvedAction >= scope;
}

if (!testUserCruved) {
const msgDroitsInsuffisants = {
C: `Droits insuffisants pour créer ${objectConfig.display.un_nouveau_label}`,
Expand Down

0 comments on commit e9de22a

Please sign in to comment.