Regular users are able to create private projects

This commit is contained in:
Frédéric Guillot
2014-10-05 19:40:57 -04:00
parent 7f5a871f84
commit d138834dcf
39 changed files with 379 additions and 319 deletions

View File

@@ -31,6 +31,29 @@ class Board extends Base
return array(t('Backlog'), t('Ready'), t('Work in progress'), t('Done'));
}
/**
* Get user default columns
*
* @access public
* @return array
*/
public function getUserColumns()
{
$column_names = explode(',', $this->config->get('board_columns', implode(',', $this->getDefaultColumns())));
$columns = array();
foreach ($column_names as $column_name) {
$column_name = trim($column_name);
if (! empty($column_name)) {
$columns[] = array('title' => $column_name, 'task_limit' => 0);
}
}
return $columns;
}
/**
* Create a board with default columns, must be executed inside a transaction
*