projects
/
platal.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove 'user' perm from X.net accounts.
[platal.git]
/
classes
/
xnetsession.php
diff --git
a/classes/xnetsession.php
b/classes/xnetsession.php
index
2833d32
..
c1c284b
100644
(file)
--- a/
classes/xnetsession.php
+++ b/
classes/xnetsession.php
@@
-1,6
+1,6
@@
<?php
/***************************************************************************
<?php
/***************************************************************************
- * Copyright (C) 2003-201
1
Polytechnique.org *
+ * Copyright (C) 2003-201
4
Polytechnique.org *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
* http://opensource.polytechnique.org/ *
* *
* This program is free software; you can redistribute it and/or modify *
@@
-29,7
+29,7
@@
class XnetSession extends XorgSession
public function startAvailableAuth()
{
if (!S::logged() && Get::has('auth')) {
public function startAvailableAuth()
{
if (!S::logged() && Get::has('auth')) {
- if (!$this->start(AUTH_
MDP
)) {
+ if (!$this->start(AUTH_
PASSWD
)) {
return false;
}
}
return false;
}
}
@@
-77,7
+77,7
@@
class XnetSession extends XorgSession
protected function doAuth($level)
{
protected function doAuth($level)
{
- if (S::identified()) { //
ok, c'est bon, on n'a rien à fai
re
+ if (S::identified()) { //
Nothing to do the
re
return User::getSilentWithValues(null, array('uid' => S::i('uid')));
}
if (!Get::has('auth')) {
return User::getSilentWithValues(null, array('uid' => S::i('uid')));
}
if (!Get::has('auth')) {
@@
-88,7
+88,7
@@
class XnetSession extends XorgSession
return null;
}
Get::kill('auth');
return null;
}
Get::kill('auth');
- S::set('auth', AUTH_
MDP
);
+ S::set('auth', AUTH_
PASSWD
);
return User::getSilentWithValues(null, array('uid' => Get::i('uid')));
}
return User::getSilentWithValues(null, array('uid' => Get::i('uid')));
}
@@
-98,8
+98,9
@@
class XnetSession extends XorgSession
if (!$user->checkPerms('groups')) {
return false;
}
if (!$user->checkPerms('groups')) {
return false;
}
+
if ($level == AUTH_SUID) {
if ($level == AUTH_SUID) {
- S::set('auth', AUTH_
MDP
);
+ S::set('auth', AUTH_
PASSWD
);
}
S::set('uid', $user->uid);
}
S::set('uid', $user->uid);
@@
-114,7
+115,7
@@
class XnetSession extends XorgSession
S::set('perms', $user->perms);
S::set('is_admin', $user->is_admin);
S::set('perms', $user->perms);
S::set('is_admin', $user->is_admin);
-
+ // Add the 'user' perms to the user.
$this->makePerms($user->perms, $user->is_admin);
S::kill('challenge');
S::kill('loginX');
$this->makePerms($user->perms, $user->is_admin);
S::kill('challenge');
S::kill('loginX');
@@
-136,7
+137,7
@@
class XnetSession extends XorgSession
if (!$this->startSUID($user)) {
return false;
}
if (!$this->startSUID($user)) {
return false;
}
- S::set('perms', User::makePerms(
PERMS_USER
));
+ S::set('perms', User::makePerms(
"groups"
));
return true;
}
return true;
}
@@
-217,5
+218,5
@@
function is_member($force = false, $lose = false)
}
// }}}
}
// }}}
-// vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8:
+// vim:set et sw=4 sts=4 sws=4 foldmethod=marker
f
enc=utf-8:
?>
?>