Merge pull request #5009 from GabrielInTheWorld/createAmendmentPerm

Fixes can create amendments if having permissions
This commit is contained in:
Emanuel Schütze 2019-09-12 17:35:55 +02:00 committed by GitHub
commit 1f3617f9ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 1 deletions

View File

@ -1100,7 +1100,7 @@ export class MotionDetailComponent extends BaseViewComponent implements OnInit,
if (mode === 'paragraph') {
this.router.navigate(['./create-amendment'], { relativeTo: this.route });
} else {
this.router.navigate(['./motions/new'], {
this.router.navigate(['./motions/new-amendment'], {
relativeTo: this.route.snapshot.params.relativeTo,
queryParams: { parent: this.motion.id || null }
});

View File

@ -52,6 +52,11 @@ const routes: Routes = [
loadChildren: () => import('./modules/motion-detail/motion-detail.module').then(m => m.MotionDetailModule),
data: { basePerm: 'motions.can_create' }
},
{
path: 'new-amendment',
loadChildren: () => import('./modules/motion-detail/motion-detail.module').then(m => m.MotionDetailModule),
data: { basePerm: 'motions.can_create_amendments' }
},
{
path: 'amendments',
loadChildren: () => import('./modules/amendment-list/amendment-list.module').then(m => m.AmendmentListModule),