// Google Apps storage is available for users with valid Google Apps account.
require_once 'googleapps.inc.php';
- if ($globals->mailstorage->googleapps_domain &&
+ if ($user->checkPerms('gapps') &&
+ $globals->mailstorage->googleapps_domain &&
GoogleAppsAccount::account_status($user->id()) == 'active') {
$storages[] = 'googleapps';
}
}
return array(
- 'googleapps' => $this->make_hook('index', AUTH_MDP, 'mail'),
+ 'googleapps' => $this->make_hook('index', AUTH_MDP, 'gapps'),
'admin/googleapps' => $this->make_hook('admin', AUTH_MDP, 'admin'),
'admin/googleapps/job' => $this->make_hook('admin_job', AUTH_MDP, 'admin'),
'admin/googleapps/user' => $this->make_hook('admin_user', AUTH_MDP, 'admin'),
{/if}
{if #globals.mailstorage.googleapps_active# or hasPerm('admin') or $googleapps}
+{if hasPerm('gapps')}
<br />
<p id="googleapps">
Grâce à un partenariat avec Google, Polytechnique.org te propose également un compte
</tr>
</table>
{/if}
+{/if}
{if $eleve}
<h1>Pour les élèves (non encore diplômés)</h1>
--- /dev/null
+ALTER TABLE account_types MODIFY COLUMN perms SET('groups','mail','directory_ax','directory_private','edit_directory','forums','lists','payment','api_user_readonly','gapps') NOT NULL DEFAULT '';
+
+UPDATE account_types
+ SET perms = 'groups,mail,directory_private,forums,lists,payment,gapps'
+ WHERE type = 'x';
+UPDATE account_types
+ SET perms = 'groups,mail,directory_private,forums,lists,payment'
+ WHERE type = 'master' OR type = 'phd';
+
+-- vim:set syntax=mysql: