Commit 4f5f3a45 authored by Kevin Robert's avatar Kevin Robert
Browse files

UNOTOPLYS-278 : Correction de la gestion des droits et du fil d'ariane, ajout d'une page d'accueil.

parent cec1e61c
...@@ -82,7 +82,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter { ...@@ -82,7 +82,7 @@ public class SecurityConfiguration extends WebSecurityConfigurerAdapter {
.antMatchers("/api/account/reset-password/init").permitAll() .antMatchers("/api/account/reset-password/init").permitAll()
.antMatchers("/api/account/reset-password/finish").permitAll() .antMatchers("/api/account/reset-password/finish").permitAll()
.antMatchers("/api/form/**").permitAll() .antMatchers("/api/form/**").permitAll()
.antMatchers("/api/**").permitAll() .antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll() .antMatchers("/management/health").permitAll()
.antMatchers("/management/health/**").permitAll() .antMatchers("/management/health/**").permitAll()
.antMatchers("/management/info").authenticated() .antMatchers("/management/info").authenticated()
......
...@@ -37,9 +37,9 @@ public class FilArianeController { ...@@ -37,9 +37,9 @@ public class FilArianeController {
private final FormService formService; private final FormService formService;
/** /**
* Elément du fil d'ariane correspondant à l'accueil. * Contexte de l'application pour les traductions.
*/ */
private final FilArianeElement filArianeHome; private final ApplicationContext applicationContext;
/** /**
* Constructeur. * Constructeur.
...@@ -51,9 +51,8 @@ public class FilArianeController { ...@@ -51,9 +51,8 @@ public class FilArianeController {
final FormService formService, final FormService formService,
final ApplicationContext applicationContext final ApplicationContext applicationContext
) { ) {
String homeTitle = applicationContext.getMessage("filariane.home.title", new Object[]{}, Locale.getDefault()); this.applicationContext = applicationContext;
this.workspaceService = workspaceService; this.workspaceService = workspaceService;
this.filArianeHome = new FilArianeElement(homeTitle, Path.HOME);
this.formService = formService; this.formService = formService;
} }
...@@ -66,11 +65,11 @@ public class FilArianeController { ...@@ -66,11 +65,11 @@ public class FilArianeController {
@ResponseBody @ResponseBody
public String getUserHome() { public String getUserHome() {
if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_WORKSPACE)) { if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_WORKSPACE)) {
return Path.LIST_WORKSPACES; return Path.ACCUEIL_WORKSPACES;
} else if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_FORM)) { } else if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_FORM)) {
return Path.LIST_FORMS; return Path.ACCUEIL_FORMS;
} }
return "#"; return Path.PAGE_LOGIN;
} }
/** /**
...@@ -81,7 +80,8 @@ public class FilArianeController { ...@@ -81,7 +80,8 @@ public class FilArianeController {
@GetMapping("/home") @GetMapping("/home")
@ResponseBody @ResponseBody
public List<FilArianeElement> getFilArianeForHome() { public List<FilArianeElement> getFilArianeForHome() {
return Collections.singletonList(filArianeHome); String homeTitle = applicationContext.getMessage("filariane.home.title", new Object[]{}, Locale.getDefault());
return Collections.singletonList(new FilArianeElement(homeTitle, getUserHome()));
} }
/** /**
...@@ -94,7 +94,7 @@ public class FilArianeController { ...@@ -94,7 +94,7 @@ public class FilArianeController {
@ResponseBody @ResponseBody
public List<FilArianeElement> getFilArianeForWorkspace(@PathVariable("idWorkspace") final Long idWorkspace) { public List<FilArianeElement> getFilArianeForWorkspace(@PathVariable("idWorkspace") final Long idWorkspace) {
LinkedList<FilArianeElement> filAriane = new LinkedList<>(); LinkedList<FilArianeElement> filAriane = new LinkedList<>();
filAriane.add(filArianeHome); filAriane.add(getFilArianeForHome().get(0));
Optional<FilArianeElement> filArianeWorkspace = getFilArianeWorkspace(idWorkspace); Optional<FilArianeElement> filArianeWorkspace = getFilArianeWorkspace(idWorkspace);
filArianeWorkspace.ifPresent(filAriane::add); filArianeWorkspace.ifPresent(filAriane::add);
return filAriane; return filAriane;
...@@ -110,7 +110,7 @@ public class FilArianeController { ...@@ -110,7 +110,7 @@ public class FilArianeController {
@ResponseBody @ResponseBody
public List<FilArianeElement> getFilArianeForForm(@PathVariable("idForm") final Long idForm) { public List<FilArianeElement> getFilArianeForForm(@PathVariable("idForm") final Long idForm) {
LinkedList<FilArianeElement> filAriane = new LinkedList<>(); LinkedList<FilArianeElement> filAriane = new LinkedList<>();
filAriane.add(filArianeHome); filAriane.add(getFilArianeForHome().get(0));
if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_FORM)) { if (PermissionService.currentUserHasAuthority(AuthoritiesConstants.AUTHORITY_VIEW_FORM)) {
final Optional<FormDTO> formDTO = formService.findOne(idForm); final Optional<FormDTO> formDTO = formService.findOne(idForm);
final FormDTO form = formDTO.orElseThrow(() -> new FilArianeException("Le formulaire n'existe pas.")); final FormDTO form = formDTO.orElseThrow(() -> new FilArianeException("Le formulaire n'existe pas."));
......
...@@ -5,10 +5,12 @@ package com.unantes.orientactive.filariane; ...@@ -5,10 +5,12 @@ package com.unantes.orientactive.filariane;
*/ */
public class Path { public class Path {
public static final String HOME = "/admin/workspace";
public static final String WORKSPACE = "/admin/workspace"; public static final String WORKSPACE = "/admin/workspace";
public static final String FORMS = "/form"; public static final String FORMS = "/form";
public static final String LIST_WORKSPACES = "/admin/workspaces"; public static final String ACCUEIL_WORKSPACES = "/admin/workspaces";
public static final String LIST_FORMS = "/admin/forms"; public static final String ACCUEIL_FORMS = "/admin/forms";
// TODO : Remplacer ça pour une page d'erreur de login du type 'Vous avez bien un compte mais vous n'avez pas de droits associés, veuillez contacter votre administrateur.'
public static final String PAGE_LOGIN = "/login";
} }
...@@ -101,4 +101,10 @@ public interface FormRepository extends JpaRepository<Form, Long>, RoleRepositor ...@@ -101,4 +101,10 @@ public interface FormRepository extends JpaRepository<Form, Long>, RoleRepositor
@Query(value = "with new_scope as (insert into scope (id_user, id_role) values (:idUser, :idRole) on conflict on constraint unique_scope do nothing returning id) insert into scope_form (id_scope, id_form) values (coalesce((select id from new_scope), (select id from scope where id_user = :idUser and id_role = :idRole)), :idForm) on conflict on constraint unique_scope_form do nothing", nativeQuery = true) @Query(value = "with new_scope as (insert into scope (id_user, id_role) values (:idUser, :idRole) on conflict on constraint unique_scope do nothing returning id) insert into scope_form (id_scope, id_form) values (coalesce((select id from new_scope), (select id from scope where id_user = :idUser and id_role = :idRole)), :idForm) on conflict on constraint unique_scope_form do nothing", nativeQuery = true)
@Modifying @Modifying
void addRoleWithPermission(@Param("idUser") Long idUser, @Param("idRole") int idRole, @Param("idForm") Long idForm); void addRoleWithPermission(@Param("idUser") Long idUser, @Param("idRole") int idRole, @Param("idForm") Long idForm);
@Query(
value = "select f.* from form f join scope_form sf on sf.id_form = f.id join scope s on s.id = sf.id_scope where s.id_user = :idUser",
nativeQuery = true
)
List<Form> getAllFormForContributeur(@Param("idUser") Long idUser);
} }
...@@ -3,22 +3,22 @@ package com.unantes.orientactive.service; ...@@ -3,22 +3,22 @@ package com.unantes.orientactive.service;
import com.unantes.orientactive.domain.Form; import com.unantes.orientactive.domain.Form;
import com.unantes.orientactive.domain.User; import com.unantes.orientactive.domain.User;
import com.unantes.orientactive.repository.FormRepository; import com.unantes.orientactive.repository.FormRepository;
import com.unantes.orientactive.security.permissions.PermissionEntity;
import com.unantes.orientactive.security.permissions.PermissionService; import com.unantes.orientactive.security.permissions.PermissionService;
import com.unantes.orientactive.security.permissions.Role; import com.unantes.orientactive.security.permissions.Role;
import com.unantes.orientactive.service.dto.AdminUserDTO; import com.unantes.orientactive.service.dto.AdminUserDTO;
import com.unantes.orientactive.service.dto.FormDTO; import com.unantes.orientactive.service.dto.FormDTO;
import com.unantes.orientactive.service.mapper.FormMapper; import com.unantes.orientactive.service.mapper.FormMapper;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import java.util.LinkedList;
import java.util.List;
import java.util.Optional;
import java.util.stream.Collectors;
/** /**
* Service Implementation for managing {@link Form}. * Service Implementation for managing {@link Form}.
*/ */
...@@ -139,6 +139,16 @@ public class FormService extends PermissionService<FormDTO> { ...@@ -139,6 +139,16 @@ public class FormService extends PermissionService<FormDTO> {
return formRepository.getFormAnswersSessionIds(id); return formRepository.getFormAnswersSessionIds(id);
} }
/**
* Récupération des formulaires éditables par un contributeur.
*
* @param idUser L'identifiant de l'utilisateur.
* @return La liste des formulaires.
*/
public List<FormDTO> getAllFormForContributeur(Long idUser) {
return formRepository.getAllFormForContributeur(idUser).stream().map(formMapper::toDto).collect(Collectors.toList());
}
@PreAuthorize("hasAuthority('EDIT_FORM')") @PreAuthorize("hasAuthority('EDIT_FORM')")
@Override @Override
public void addRole(User user) { public void addRole(User user) {
......
...@@ -4,21 +4,30 @@ import com.unantes.orientactive.repository.FormRepository; ...@@ -4,21 +4,30 @@ import com.unantes.orientactive.repository.FormRepository;
import com.unantes.orientactive.service.FormService; import com.unantes.orientactive.service.FormService;
import com.unantes.orientactive.service.dto.FormDTO; import com.unantes.orientactive.service.dto.FormDTO;
import com.unantes.orientactive.web.rest.errors.BadRequestAlertException; import com.unantes.orientactive.web.rest.errors.BadRequestAlertException;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import tech.jhipster.web.util.HeaderUtil; import tech.jhipster.web.util.HeaderUtil;
import tech.jhipster.web.util.ResponseUtil; import tech.jhipster.web.util.ResponseUtil;
import javax.validation.Valid;
import javax.validation.constraints.NotNull;
import java.net.URI;
import java.net.URISyntaxException;
import java.util.List;
import java.util.Objects;
import java.util.Optional;
/** /**
* REST controller for managing {@link com.unantes.orientactive.domain.Form}. * REST controller for managing {@link com.unantes.orientactive.domain.Form}.
*/ */
...@@ -65,7 +74,7 @@ public class FormResource { ...@@ -65,7 +74,7 @@ public class FormResource {
/** /**
* {@code PUT /forms/:id} : Updates an existing form. * {@code PUT /forms/:id} : Updates an existing form.
* *
* @param id the id of the formDTO to save. * @param id the id of the formDTO to save.
* @param formDTO the formDTO to update. * @param formDTO the formDTO to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated formDTO, * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated formDTO,
* or with status {@code 400 (Bad Request)} if the formDTO is not valid, * or with status {@code 400 (Bad Request)} if the formDTO is not valid,
...@@ -99,7 +108,7 @@ public class FormResource { ...@@ -99,7 +108,7 @@ public class FormResource {
/** /**
* {@code PATCH /forms/:id} : Partial updates given fields of an existing form, field will ignore if it is null * {@code PATCH /forms/:id} : Partial updates given fields of an existing form, field will ignore if it is null
* *
* @param id the id of the formDTO to save. * @param id the id of the formDTO to save.
* @param formDTO the formDTO to update. * @param formDTO the formDTO to update.
* @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated formDTO, * @return the {@link ResponseEntity} with status {@code 200 (OK)} and with body the updated formDTO,
* or with status {@code 400 (Bad Request)} if the formDTO is not valid, * or with status {@code 400 (Bad Request)} if the formDTO is not valid,
...@@ -171,4 +180,15 @@ public class FormResource { ...@@ -171,4 +180,15 @@ public class FormResource {
.headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString())) .headers(HeaderUtil.createEntityDeletionAlert(applicationName, true, ENTITY_NAME, id.toString()))
.build(); .build();
} }
/**
* Récupération des formulaires d'un contributeur.
*
* @param idUser L'identifiant du contributeur.
* @return La liste des formulaire.
*/
@GetMapping("/forms/user/{idUser}")
public List<FormDTO> getAllFormForContributeur(@PathVariable Long idUser) {
return formService.getAllFormForContributeur(idUser);
}
} }
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
<div class="alert alert-danger">{{ errorMessage }}</div> <div class="alert alert-danger">{{ errorMessage }}</div>
</div> </div>
<div v-if="error403" class="alert alert-danger">{{ $t('error.http.403') }}</div> <div v-if="error403" class="alert alert-danger">{{ $t('error.http.403') }}</div>
<div v-if="error403" class="alert"><a href="/login">Page d'accueil</a></div>
<div v-if="error404" class="alert alert-warning">{{ $t('error.http.404') }}</div> <div v-if="error404" class="alert alert-warning">{{ $t('error.http.404') }}</div>
</div> </div>
</template> </template>
......
...@@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => { ...@@ -51,7 +51,7 @@ router.beforeEach((to, from, next) => {
accountService.checkAuth().then(value => { accountService.checkAuth().then(value => {
// si l'utilisateur est déjà connecté, on redirige vers la page d'accueil // si l'utilisateur est déjà connecté, on redirige vers la page d'accueil
if (value) { if (value) {
next(ROUTES.admin.path); accountService.retrieveUsersHome().then(homePath => next(homePath));
} else { } else {
// sinon on continue vers la page de login // sinon on continue vers la page de login
next(); next();
......
...@@ -7,6 +7,6 @@ export default [ ...@@ -7,6 +7,6 @@ export default [
path: '/admin/account/settings', path: '/admin/account/settings',
name: 'Settings', name: 'Settings',
component: Settings, component: Settings,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
]; ];
import { Authority } from '@/shared/security/authority'; import {Authority} from '@/shared/security/authority';
import {PanelUtils} from "@/components/panel/panel.utils"; import {PanelUtils} from "@/components/panel/panel.utils";
const FormCreationComponent = () => import('@/views/form/form-creation.vue'); const FormCreationComponent = () => import('@/views/form/form-creation.vue');
...@@ -14,45 +14,47 @@ export default [ ...@@ -14,45 +14,47 @@ export default [
path: '/admin/workspace/:idWorkspace/form/creation', path: '/admin/workspace/:idWorkspace/form/creation',
name: 'FormCreationComponent', name: 'FormCreationComponent',
component: FormCreationComponent, component: FormCreationComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM] },
}, },
{ {
// TODO : Non supporté par l'application actuellement.
path: '/admin/form/:idForm/preview', path: '/admin/form/:idForm/preview',
name: 'FormPreviewComponent', name: 'FormPreviewComponent',
component: FormPreviewComponent, component: FormPreviewComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/form/:idForm/results', path: '/admin/form/:idForm/results',
name: 'FormResultsComponent', name: 'FormResultsComponent',
component: FormResultsComponent, component: FormResultsComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS, Authority.VIEW_RESULT] },
}, },
{ {
path: '/admin/workspace/:idWorkspace/form/:idForm/settings', path: '/admin/workspace/:idWorkspace/form/:idForm/settings',
name: 'FormSettingsComponent', name: 'FormSettingsComponent',
component: FormSettingsComponent, component: FormSettingsComponent,
meta: { meta: {
authorities: [Authority.ADMIN], authorities: [Authority.ADMIN_SAAS, Authority.EDIT_WORKSPACE],
panel: PanelUtils.PANEL_FORM, panel: PanelUtils.PANEL_FORM,
}, },
}, },
{ {
// TODO : Non supporté par l'application actuellement.
path: '/admin/form/:idForm/share', path: '/admin/form/:idForm/share',
name: 'FormShareComponent', name: 'FormShareComponent',
component: FormShareComponent, component: FormShareComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/form/list', path: '/admin/form/list',
name: 'FormListComponent', name: 'FormListComponent',
component: FormListComponent, component: FormListComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS, Authority.VIEW_FORM] },
}, },
{ {
path: '/admin/form/:idForm/variables', path: '/admin/form/:idForm/variables',
name: 'FormVariablesComponent', name: 'FormVariablesComponent',
component: FormVariablesComponent, component: FormVariablesComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM] },
}, },
]; ];
...@@ -6,42 +6,45 @@ const JhiHealthComponent = () => import('@/admin/health/health.vue'); ...@@ -6,42 +6,45 @@ const JhiHealthComponent = () => import('@/admin/health/health.vue');
const JhiLogsComponent = () => import('@/admin/logs/logs.vue'); const JhiLogsComponent = () => import('@/admin/logs/logs.vue');
const JhiAuditsComponent = () => import('@/admin/audits/audits.vue'); const JhiAuditsComponent = () => import('@/admin/audits/audits.vue');
const JhiMetricsComponent = () => import('@/admin/metrics/metrics.vue'); const JhiMetricsComponent = () => import('@/admin/metrics/metrics.vue');
/**
* Comporte différentes pages d'administration générées par Jhipster.
* Elles ne sont plus supportées, mais elles sont conservées car elles peuvent rester utiles afin d'avoir des statistiques sur l'application.
*/
export default [ export default [
{ {
path: '/admin/docs', path: '/admin/docs',
name: 'JhiDocsComponent', name: 'JhiDocsComponent',
component: JhiDocsComponent, component: JhiDocsComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/audits', path: '/admin/audits',
name: 'JhiAuditsComponent', name: 'JhiAuditsComponent',
component: JhiAuditsComponent, component: JhiAuditsComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/jhi-health', path: '/admin/jhi-health',
name: 'JhiHealthComponent', name: 'JhiHealthComponent',
component: JhiHealthComponent, component: JhiHealthComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/logs', path: '/admin/logs',
name: 'JhiLogsComponent', name: 'JhiLogsComponent',
component: JhiLogsComponent, component: JhiLogsComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/jhi-metrics', path: '/admin/jhi-metrics',
name: 'JhiMetricsComponent', name: 'JhiMetricsComponent',
component: JhiMetricsComponent, component: JhiMetricsComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
{ {
path: '/admin/jhi-configuration', path: '/admin/jhi-configuration',
name: 'JhiConfigurationComponent', name: 'JhiConfigurationComponent',
component: JhiConfigurationComponent, component: JhiConfigurationComponent,
meta: { authorities: [Authority.ADMIN] }, meta: { authorities: [Authority.ADMIN_SAAS] },
}, },
]; ];
import { Authority } from '@/shared/security/authority'; import {Authority} from '@/shared/security/authority';
import { PanelUtils } from '@/components/panel/panel.utils'; import {PanelUtils} from '@/components/panel/panel.utils';
const ScreenCreateComponent = () => import('@/views/screen/screen-create.vue'); const ScreenCreateComponent = () => import('@/views/screen/screen-create.vue');
const ScreenEditComponent = () => import('@/views/screen/screen-edit.vue'); const ScreenEditComponent = () => import('@/views/screen/screen-edit.vue');
...@@ -11,7 +11,7 @@ export default [ ...@@ -11,7 +11,7 @@ export default [
name: 'ScreenCreateComponent', name: 'ScreenCreateComponent',
component: ScreenCreateComponent, component: ScreenCreateComponent,
meta: { meta: {
authorities: [Authority.ADMIN], authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM],
panel: PanelUtils.PANEL_SCREEN, panel: PanelUtils.PANEL_SCREEN,
}, },
}, },
...@@ -20,7 +20,7 @@ export default [ ...@@ -20,7 +20,7 @@ export default [
name: 'ScreenEditComponent', name: 'ScreenEditComponent',
component: ScreenEditComponent, component: ScreenEditComponent,
meta: { meta: {
authorities: [Authority.ADMIN], authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM],
panel: PanelUtils.PANEL_SCREEN, panel: PanelUtils.PANEL_SCREEN,
}, },
}, },
...@@ -29,7 +29,7 @@ export default [ ...@@ -29,7 +29,7 @@ export default [
name: 'ScreenSettingsComponent', name: 'ScreenSettingsComponent',
component: ScreenSettingsComponent, component: ScreenSettingsComponent,
meta: { meta: {
authorities: [Authority.ADMIN], authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM],
panel: PanelUtils.PANEL_SCREEN, panel: PanelUtils.PANEL_SCREEN,
}, },
}, },
...@@ -38,7 +38,7 @@ export default [ ...@@ -38,7 +38,7 @@ export default [
name: 'FirstScreenEditComponent', name: 'FirstScreenEditComponent',
component: ScreenEditComponent, component: ScreenEditComponent,
meta: { meta: {
authorities: [Authority.ADMIN], authorities: [Authority.ADMIN_SAAS, Authority.EDIT_FORM],
panel: PanelUtils.PANEL_SCREEN, panel: PanelUtils.PANEL_SCREEN,