summaryrefslogtreecommitdiff
path: root/app/Model
diff options
context:
space:
mode:
Diffstat (limited to 'app/Model')
-rw-r--r--app/Model/Acl.php3
-rw-r--r--app/Model/User.php8
2 files changed, 2 insertions, 9 deletions
diff --git a/app/Model/Acl.php b/app/Model/Acl.php
index f2b287be..a7620731 100644
--- a/app/Model/Acl.php
+++ b/app/Model/Acl.php
@@ -32,8 +32,7 @@ class Acl extends Base
'app' => array('index'),
'board' => array('index', 'show', 'assign', 'assigntask', 'save', 'check'),
'project' => array('tasks', 'index', 'forbidden', 'search', 'export', 'show'),
- 'user' => array('index', 'edit', 'update', 'forbidden', 'logout', 'index', 'unlinkgoogle', 'unlinkgithub'),
- 'config' => array('index', 'removeremembermetoken', 'notifications'),
+ 'user' => array('index', 'edit', 'forbidden', 'logout', 'index', 'show', 'external', 'unlinkgoogle', 'unlinkgithub', 'sessions', 'removesession', 'last', 'notifications', 'password'),
'comment' => array('create', 'save', 'confirm', 'remove', 'update', 'edit', 'forbidden'),
'file' => array('create', 'save', 'download', 'confirm', 'remove', 'open', 'image'),
'subtask' => array('create', 'save', 'edit', 'update', 'confirm', 'remove'),
diff --git a/app/Model/User.php b/app/Model/User.php
index d019dfcc..918ecf2a 100644
--- a/app/Model/User.php
+++ b/app/Model/User.php
@@ -86,7 +86,7 @@ class User extends Base
return $this->db
->table(self::TABLE)
->asc('username')
- ->columns('id', 'username', 'name', 'email', 'is_admin', 'default_project_id', 'is_ldap_user')
+ ->columns('id', 'username', 'name', 'email', 'is_admin', 'default_project_id', 'is_ldap_user', 'notifications_enabled', 'google_id', 'github_id')
->findAll();
}
@@ -291,17 +291,11 @@ class User extends Base
{
$v = new Validator($values, array(
new Validators\Required('id', t('The user id is required')),
- new Validators\Required('username', t('The username is required')),
- new Validators\MaxLength('username', t('The maximum length is %d characters', 50), 50),
- new Validators\Unique('username', t('The username must be unique'), $this->db->getConnection(), self::TABLE, 'id'),
new Validators\Required('current_password', t('The current password is required')),
new Validators\Required('password', t('The password is required')),
new Validators\MinLength('password', t('The minimum length is %d characters', 6), 6),
new Validators\Required('confirmation', t('The confirmation is required')),
new Validators\Equals('password', 'confirmation', t('Passwords don\'t match')),
- new Validators\Integer('default_project_id', t('This value must be an integer')),
- new Validators\Integer('is_admin', t('This value must be an integer')),
- new Validators\Email('email', t('Email address invalid')),
));
if ($v->execute()) {