Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Memorekall Member New
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Rekall
Memorekall Member New
Commits
5a353ede
Commit
5a353ede
authored
3 years ago
by
Camille Simiand
Browse files
Options
Downloads
Patches
Plain Diff
Fix editors can edit capsule
parent
53f61a96
No related branches found
No related tags found
1 merge request
!45
tuleap-81-allow-a-new-user-to-access-the-capsule-edition-mode
Pipeline
#762
failed
3 years ago
Stage: test
Changes
3
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/Controller/CapsuleController.php
+8
-2
8 additions, 2 deletions
src/Controller/CapsuleController.php
translations/messages.en.yaml
+2
-1
2 additions, 1 deletion
translations/messages.en.yaml
translations/messages.fr.yaml
+2
-1
2 additions, 1 deletion
translations/messages.fr.yaml
with
12 additions
and
4 deletions
src/Controller/CapsuleController.php
+
8
−
2
View file @
5a353ede
...
@@ -116,9 +116,15 @@ class CapsuleController extends AbstractController
...
@@ -116,9 +116,15 @@ class CapsuleController extends AbstractController
return
$this
->
redirectToRoute
(
'app_logout'
);
return
$this
->
redirectToRoute
(
'app_logout'
);
}
}
$capsule
=
$capsuleRepository
->
findOneBy
([
'link_path'
=>
$path
,
'creation_author'
=>
$current_user
]);
$capsule
=
$capsuleRepository
->
findOneBy
([
'link_path'
=>
$path
]);
if
(
null
===
$capsule
)
{
if
(
null
===
$capsule
)
{
$this
->
addFlash
(
'warning'
,
$translator
->
trans
(
'capsule.edition_not_allowed'
));
$this
->
addFlash
(
'warning'
,
$translator
->
trans
(
'capsule.edit.not_found'
));
return
$this
->
redirectToRoute
(
'capsule_list'
);
}
if
(
!
$capsule
->
getEditors
()
->
contains
(
$current_user
))
{
$this
->
addFlash
(
'warning'
,
$translator
->
trans
(
'capsule.edit.not_allowed'
));
return
$this
->
redirectToRoute
(
'capsule_list'
);
return
$this
->
redirectToRoute
(
'capsule_list'
);
}
}
...
...
This diff is collapsed.
Click to expand it.
translations/messages.en.yaml
+
2
−
1
View file @
5a353ede
...
@@ -62,13 +62,14 @@ capsule:
...
@@ -62,13 +62,14 @@ capsule:
video_url
:
Youtube or Vimeo video URL
video_url
:
Youtube or Vimeo video URL
created_success
:
Capsule capsule_name was created successfully
created_success
:
Capsule capsule_name was created successfully
no_edition_access
:
No edition access
no_edition_access
:
No edition access
edition_not_allowed
:
You are not allowed to edit this capsule
contact_capsule_author_for_access
:
Please contact the author to gain access the edition mode
contact_capsule_author_for_access
:
Please contact the author to gain access the edition mode
not_found
:
The project doesn't exist
not_found
:
The project doesn't exist
edit_permissions
:
edit_permissions
:
link
:
Edit permissions
link
:
Edit permissions
edit
:
edit
:
link
:
Edit capsule
link
:
Edit capsule
not_allowed
:
You are not allowed to edit this capsule
not_found
:
The capsule was not found
duplicate
:
duplicate
:
link
:
Duplicate capsule
link
:
Duplicate capsule
title
:
Duplicate capsule
title
:
Duplicate capsule
...
...
This diff is collapsed.
Click to expand it.
translations/messages.fr.yaml
+
2
−
1
View file @
5a353ede
...
@@ -60,12 +60,13 @@ capsule:
...
@@ -60,12 +60,13 @@ capsule:
video_url
:
URL de la video Youtube ou Vimeo
video_url
:
URL de la video Youtube ou Vimeo
created_success
:
La capsule capsule_name a été créée
created_success
:
La capsule capsule_name a été créée
no_edition_access
:
Pas d'accès au mode édition
no_edition_access
:
Pas d'accès au mode édition
edition_not_allowed
:
Vous n'êtes pas autorisé a modifier cette capsule
contact_capsule_author_for_access
:
Veuillez contacter l'auteur de la capsule pour lui demander son accès en mode édition
contact_capsule_author_for_access
:
Veuillez contacter l'auteur de la capsule pour lui demander son accès en mode édition
edit_permissions
:
edit_permissions
:
link
:
Modifier les permissions
link
:
Modifier les permissions
edit
:
edit
:
link
:
Modifier la capsule
link
:
Modifier la capsule
not_allowed
:
Vous n'êtes pas autorisé a modifier cette capsule
not_found
:
La capsule n'existe pas
duplicate
:
duplicate
:
link
:
Dupliquer la capsule
link
:
Dupliquer la capsule
title
:
Dupliquer la capsule
title
:
Dupliquer la capsule
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment