From d138834dcf902534f78237939926e97fd9a0eebe Mon Sep 17 00:00:00 2001 From: Frédéric Guillot Date: Sun, 5 Oct 2014 19:40:57 -0400 Subject: Regular users are able to create private projects --- app/Model/Board.php | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'app/Model/Board.php') diff --git a/app/Model/Board.php b/app/Model/Board.php index ac9cbdf9..728d9d29 100644 --- a/app/Model/Board.php +++ b/app/Model/Board.php @@ -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 * -- cgit v1.2.3