Skip to content

Commit 01f908b

Browse files
committed
Merge branch 'master' of github.com:chamilo/chamilo-lms
2 parents 879e908 + 33ee716 commit 01f908b

File tree

3 files changed

+4
-3
lines changed

3 files changed

+4
-3
lines changed

public/main/admin/user_edit.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ function confirmation(name) {
112112
api_get_self().'?user_id='.$user_id,
113113
''
114114
);
115+
$form->protect();
115116
$form->addElement('header', $tool_name);
116117
$form->addElement('hidden', 'user_id', $user_id);
117118

src/CoreBundle/Entity/Course.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,8 @@
7171
read: false,
7272
deserialize: false,
7373
),
74-
new Post(security: "is_granted('ROLE_USER')"),
75-
new GetCollection(security: "is_granted('ROLE_USER')"),
74+
new Post(security: "is_granted('ROLE_TEACHER') or is_granted('ROLE_ADMIN')"),
75+
new GetCollection(security: "is_granted('ROLE_TEACHER') or is_granted('ROLE_ADMIN')"),
7676
new GetCollection(
7777
uriTemplate: '/public_courses',
7878
normalizationContext: ['groups' => ['course:read']],

src/CoreBundle/Entity/User.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@
104104
),
105105
new Put(security: "is_granted('EDIT', object)"),
106106
new Delete(security: "is_granted('DELETE', object)"),
107-
new GetCollection(security: "is_granted('ROLE_USER')"),
107+
new GetCollection(security: "is_granted('ROLE_ADMIN')"),
108108
new Post(security: "is_granted('ROLE_ADMIN')"),
109109
new GetCollection(
110110
uriTemplate: '/users/{id}/skills',

0 commit comments

Comments
 (0)