[opw-web] Only allow owner, mentors, and admins to view a project
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [opw-web] Only allow owner, mentors, and admins to view a project
- Date: Mon, 17 Mar 2014 05:20:28 +0000 (UTC)
commit 7d92a373705064c1518cfef6f44f3da33c742f2d
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Mon Mar 17 01:18:40 2014 -0400
Only allow owner, mentors, and admins to view a project
Change permissions for viewing a project to allow owner, mentors,
and admins to view it, regardless of the pending/accepted/rejected
status.
modules/mod_view_projects.php | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/modules/mod_view_projects.php b/modules/mod_view_projects.php
index 2326c23..1a43c17 100644
--- a/modules/mod_view_projects.php
+++ b/modules/mod_view_projects.php
@@ -440,10 +440,9 @@ else if ($action == 'view')
$cache->put("participant_{$project_id}", $participant_data, 'projects');
}
- // Now that we have project data, allow only owner or admin to view
- // a rejected project
- $user->restrict($project_data['is_accepted'] != 0 ||
- ($project_data['is_accepted'] == 0 && $is_owner), true);
+ // Now that we have project data, allow only owner, mentors, and admins
+ // to view the project
+ $user->restrict($role == 'm' || $is_owner, true);
// Only allow mentors and admins to view mentorship unless project is accepted
$can_view_mentor = $project_data['is_accepted'] == 1 || $user->is_admin || $role == 'm';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]