r108926 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r108925‎ | r108926 | r108927 >
Date:17:45, 14 January 2012
Author:jeroendedauw
Status:deferred
Tags:
Comment:
added rights to add/remove ambassadors and instructors from stuff
Modified paths:
  • /trunk/extensions/EducationProgram/EducationProgram.i18n.php (modified) (history)
  • /trunk/extensions/EducationProgram/EducationProgram.php (modified) (history)

Diff [purge]

Index: trunk/extensions/EducationProgram/EducationProgram.i18n.php
@@ -64,6 +64,9 @@
6565 'right-ep-token' => 'See Education Program enrollment tokens',
6666 'right-ep-remstudent' => 'Remove students from terms',
6767 'right-ep-enroll' => 'Enroll in Education Program terms',
 68+ 'right-ep-online' => 'Add or remove online ambassadors to terms',
 69+ 'right-ep-campus' => 'Add or remove campus ambassadors to terms',
 70+ 'right-ep-instructor' => 'Add or remove instructors to courses',
6871
6972 // Actions
7073 'action-ep-org' => 'manage institutions',
@@ -72,6 +75,9 @@
7376 'action-ep-token' => 'see enrollment tokens',
7477 'action-ep-remstudent' => 'remove students from terms',
7578 'action-ep-enroll' => 'enroll in terms',
 79+ 'action-ep-online' => 'add or remove online ambassadors to terms',
 80+ 'action-ep-campus' => 'add or remove campus ambassadors to terms',
 81+ 'action-ep-instructor' => 'add or remove instructors to courses',
7682
7783 // Groups
7884 'group-epadmin' => 'Education program admins',
Index: trunk/extensions/EducationProgram/EducationProgram.php
@@ -166,13 +166,19 @@
167167 $wgAvailableRights[] = 'ep-token'; // See enrollment tokens
168168 $wgAvailableRights[] = 'ep-enroll'; // Enroll as a student
169169 $wgAvailableRights[] = 'ep-remstudent'; // Dissasociate students from terms
 170+$wgAvailableRights[] = 'ep-online'; // Add or remove online ambassadors from terms
 171+$wgAvailableRights[] = 'ep-campus'; // Add or remove campus ambassadors from terms
 172+$wgAvailableRights[] = 'ep-instructor'; // Add or remove instructors from courses
170173
 174+$wgGroupPermissions['*']['ep-enroll'] = true;
171175 $wgGroupPermissions['*']['ep-org'] = false;
172176 $wgGroupPermissions['*']['ep-course'] = false;
173177 $wgGroupPermissions['*']['ep-term'] = false;
174178 $wgGroupPermissions['*']['ep-token'] = false;
175179 $wgGroupPermissions['*']['ep-remstudent'] = false;
176 -$wgGroupPermissions['*']['ep-enroll'] = true;
 180+$wgGroupPermissions['*']['ep-online'] = false;
 181+$wgGroupPermissions['*']['ep-campus'] = false;
 182+$wgGroupPermissions['*']['ep-instructor'] = false;
177183
178184 $wgGroupPermissions['epstaff']['ep-org'] = true;
179185 $wgGroupPermissions['epstaff']['ep-course'] = true;
@@ -180,6 +186,9 @@
181187 $wgGroupPermissions['epstaff']['ep-token'] = true;
182188 $wgGroupPermissions['epstaff']['ep-enroll'] = true;
183189 $wgGroupPermissions['epstaff']['ep-remstudent'] = true;
 190+$wgGroupPermissions['epstaff']['ep-online'] = true;
 191+$wgGroupPermissions['epstaff']['ep-campus'] = true;
 192+$wgGroupPermissions['epstaff']['ep-instructor'] = true;
184193
185194 $wgGroupPermissions['epadmin']['ep-org'] = true;
186195 $wgGroupPermissions['epadmin']['ep-course'] = true;
@@ -187,6 +196,9 @@
188197 $wgGroupPermissions['epadmin']['ep-token'] = true;
189198 $wgGroupPermissions['epadmin']['ep-enroll'] = true;
190199 $wgGroupPermissions['epadmin']['ep-remstudent'] = true;
 200+$wgGroupPermissions['epadmin']['ep-online'] = true;
 201+$wgGroupPermissions['epadmin']['ep-campus'] = true;
 202+$wgGroupPermissions['epadmin']['ep-instructor'] = true;
191203
192204 $wgGroupPermissions['eponlineamb']['ep-org'] = true;
193205 $wgGroupPermissions['eponlineamb']['ep-course'] = true;
@@ -203,6 +215,8 @@
204216 $wgGroupPermissions['epinstructor']['ep-term'] = true;
205217 $wgGroupPermissions['epinstructor']['ep-token'] = true;
206218 $wgGroupPermissions['epinstructor']['ep-remstudent'] = true;
 219+$wgGroupPermissions['epinstructor']['ep-online'] = true;
 220+$wgGroupPermissions['epinstructor']['ep-campus'] = true;
207221
208222 $wgGroupPermissions['epstaff']['userrights'] = false;
209223 $wgAddGroups['epstaff'] = array( 'epstaff', 'epadmin', 'eponlineamb', 'epcampamb', 'epinstructor' );

Status & tagging log