Remove feature "Allow everybody to access to this project"

This commit is contained in:
Frederic Guillot 2017-10-27 16:16:11 -07:00
parent 0b9c3b0a5b
commit cc6618901b
47 changed files with 53 additions and 320 deletions

View File

@ -1,3 +1,15 @@
Version 1.x (unreleased)
------------------------
Breaking changes:
* Remove feature "Allow everybody to access to this project" (You must define members and groups)
* Composer dependencies are now included in the repository (except development dependencies)
Improvements:
* You can get an archive of Kanboard by using the download button in Github or the command git archive
Version 1.0.48 (October 23, 2017) Version 1.0.48 (October 23, 2017)
--------------------------------- ---------------------------------

View File

@ -32,21 +32,21 @@ test-browser:
@ ./vendor/bin/phpunit -c tests/acceptance.xml @ ./vendor/bin/phpunit -c tests/acceptance.xml
integration-test-mysql: integration-test-mysql:
@ composer install @ composer install --dev
@ docker-compose -f tests/docker/compose.integration.mysql.yaml build @ docker-compose -f tests/docker/compose.integration.mysql.yaml build
@ docker-compose -f tests/docker/compose.integration.mysql.yaml up -d mysql app @ docker-compose -f tests/docker/compose.integration.mysql.yaml up -d mysql app
@ docker-compose -f tests/docker/compose.integration.mysql.yaml up tests @ docker-compose -f tests/docker/compose.integration.mysql.yaml up tests
@ docker-compose -f tests/docker/compose.integration.mysql.yaml down @ docker-compose -f tests/docker/compose.integration.mysql.yaml down
integration-test-postgres: integration-test-postgres:
@ composer install @ composer install --dev
@ docker-compose -f tests/docker/compose.integration.postgres.yaml build @ docker-compose -f tests/docker/compose.integration.postgres.yaml build
@ docker-compose -f tests/docker/compose.integration.postgres.yaml up -d postgres app @ docker-compose -f tests/docker/compose.integration.postgres.yaml up -d postgres app
@ docker-compose -f tests/docker/compose.integration.postgres.yaml up tests @ docker-compose -f tests/docker/compose.integration.postgres.yaml up tests
@ docker-compose -f tests/docker/compose.integration.postgres.yaml down @ docker-compose -f tests/docker/compose.integration.postgres.yaml down
integration-test-sqlite: integration-test-sqlite:
@ composer install @ composer install --dev
@ docker-compose -f tests/docker/compose.integration.sqlite.yaml build @ docker-compose -f tests/docker/compose.integration.sqlite.yaml build
@ docker-compose -f tests/docker/compose.integration.sqlite.yaml up -d app @ docker-compose -f tests/docker/compose.integration.sqlite.yaml up -d app
@ docker-compose -f tests/docker/compose.integration.sqlite.yaml up tests @ docker-compose -f tests/docker/compose.integration.sqlite.yaml up tests

View File

@ -59,25 +59,6 @@ class ProjectPermissionController extends BaseController
))); )));
} }
/**
* Allow everybody
*
* @access public
*/
public function allowEverybody()
{
$project = $this->getProject();
$values = $this->request->getValues() + array('is_everybody_allowed' => 0);
if ($this->projectModel->update($values)) {
$this->flash->success(t('Project updated successfully.'));
} else {
$this->flash->failure(t('Unable to update this project.'));
}
$this->response->redirect($this->helper->url->to('ProjectPermissionController', 'index', array('project_id' => $project['id'])));
}
/** /**
* Add user to the project * Add user to the project
* *

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Spisak aktivnosti', 'Activity stream' => 'Spisak aktivnosti',
'Dashboard' => 'Panel', 'Dashboard' => 'Panel',
'Confirmation' => 'Potvrda', 'Confirmation' => 'Potvrda',
'Allow everybody to access to this project' => 'Dozvoli svima pristup ovom projektu',
'Everybody have access to this project.' => 'Svima je dozvoljen pristup ovom projektu.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Napravi komentar preko vanjskog posrednika', 'Create a comment from an external provider' => 'Napravi komentar preko vanjskog posrednika',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Fluxe d\'activitat', 'Activity stream' => 'Fluxe d\'activitat',
'Dashboard' => 'Panell', 'Dashboard' => 'Panell',
'Confirmation' => 'Confirmació', 'Confirmation' => 'Confirmació',
'Allow everybody to access to this project' => 'Deixa que tothom per accedir a aquest projecte',
'Everybody have access to this project.' => 'Tothom té accés a aquest projecte.',
'Webhooks' => 'WebHooks', 'Webhooks' => 'WebHooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Crear un comentari d\'un proveïdor extern', 'Create a comment from an external provider' => 'Crear un comentari d\'un proveïdor extern',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Přehled aktivit', 'Activity stream' => 'Přehled aktivit',
'Dashboard' => 'Nástěnka', 'Dashboard' => 'Nástěnka',
'Confirmation' => 'Potvrzení', 'Confirmation' => 'Potvrzení',
'Allow everybody to access to this project' => 'Umožní přístup komukoliv k tomuto projektu',
'Everybody have access to this project.' => 'Přístup k tomuto projektu má kdokoliv.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Vytvořit komentář pomocí externího poskytovatele', 'Create a comment from an external provider' => 'Vytvořit komentář pomocí externího poskytovatele',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitets strøm', 'Activity stream' => 'Aktivitets strøm',
'Dashboard' => 'Dashboard', 'Dashboard' => 'Dashboard',
'Confirmation' => 'Bekræftelse', 'Confirmation' => 'Bekræftelse',
'Allow everybody to access to this project' => 'Tillad adgang for alle til dette projekt',
'Everybody have access to this project.' => 'Alle har adgang til dette projekt',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
// 'Create a comment from an external provider' => '', // 'Create a comment from an external provider' => '',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Letzte Aktivitäten', 'Activity stream' => 'Letzte Aktivitäten',
'Dashboard' => 'Dashboard', 'Dashboard' => 'Dashboard',
'Confirmation' => 'Wiederholung', 'Confirmation' => 'Wiederholung',
'Allow everybody to access to this project' => 'Jedem Zugriff zu diesem Projekt gewähren',
'Everybody have access to this project.' => 'Jeder hat Zugriff zu diesem Projekt',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Kommentar eines externen Providers hinzufügen', 'Create a comment from an external provider' => 'Kommentar eines externen Providers hinzufügen',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Ροή δραστηριότητας', 'Activity stream' => 'Ροή δραστηριότητας',
'Dashboard' => 'Κεντρικό ταμπλό', 'Dashboard' => 'Κεντρικό ταμπλό',
'Confirmation' => 'Επιβεβαίωση', 'Confirmation' => 'Επιβεβαίωση',
'Allow everybody to access to this project' => 'Να επιτρέπετε σε όλους να έχουν πρόσβαση σε αυτό το έργο',
'Everybody have access to this project.' => 'Όλοι έχουν πρόσβαση σε αυτό το έργο.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Δημιουργήστε ένα σχόλιο από έναν εξωτερικό πάροχο', 'Create a comment from an external provider' => 'Δημιουργήστε ένα σχόλιο από έναν εξωτερικό πάροχο',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flujo de actividad', 'Activity stream' => 'Flujo de actividad',
'Dashboard' => 'Tablero', 'Dashboard' => 'Tablero',
'Confirmation' => 'Confirmación', 'Confirmation' => 'Confirmación',
'Allow everybody to access to this project' => 'Permitir a cualquier acceder a este proyecto',
'Everybody have access to this project.' => 'Cualquier tiene acceso a este proyecto',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Crear un comentario a partir de un proveedor externo', 'Create a comment from an external provider' => 'Crear un comentario a partir de un proveedor externo',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Toiminta', 'Activity stream' => 'Toiminta',
'Dashboard' => 'Työpöytä', 'Dashboard' => 'Työpöytä',
'Confirmation' => 'Vahvistus', 'Confirmation' => 'Vahvistus',
'Allow everybody to access to this project' => 'Anna kaikille käyttöoikeus tähän projektiin',
'Everybody have access to this project.' => 'Kaikilla on käyttöoikeus projektiin.',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
// 'Create a comment from an external provider' => '', // 'Create a comment from an external provider' => '',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flux d\'activité', 'Activity stream' => 'Flux d\'activité',
'Dashboard' => 'Tableau de bord', 'Dashboard' => 'Tableau de bord',
'Confirmation' => 'Confirmation', 'Confirmation' => 'Confirmation',
'Allow everybody to access to this project' => 'Autoriser tout le monde à accéder à ce projet',
'Everybody have access to this project.' => 'Tout le monde a accès à ce projet.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Créer un commentaire depuis un fournisseur externe', 'Create a comment from an external provider' => 'Créer un commentaire depuis un fournisseur externe',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Popis aktivnosti', 'Activity stream' => 'Popis aktivnosti',
'Dashboard' => 'Nadzorna ploča', 'Dashboard' => 'Nadzorna ploča',
'Confirmation' => 'Potvrda', 'Confirmation' => 'Potvrda',
'Allow everybody to access to this project' => 'Dozvoli svima pristup projektu',
'Everybody have access to this project.' => 'Svima je dozvoljen pristup.',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
// 'Create a comment from an external provider' => '', // 'Create a comment from an external provider' => '',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Legutóbbi tevékenységek', 'Activity stream' => 'Legutóbbi tevékenységek',
'Dashboard' => 'Vezérlőpult', 'Dashboard' => 'Vezérlőpult',
'Confirmation' => 'Megerősítés', 'Confirmation' => 'Megerősítés',
'Allow everybody to access to this project' => 'A projekt elérése mindenkinek engedélyezett',
'Everybody have access to this project.' => 'Mindenki elérheti a projektet',
'Webhooks' => 'Webhook', 'Webhooks' => 'Webhook',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Megjegyzés létrehozása külső felhasználótól', 'Create a comment from an external provider' => 'Megjegyzés létrehozása külső felhasználótól',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Arus aktifitas', 'Activity stream' => 'Arus aktifitas',
'Dashboard' => 'Dasbor', 'Dashboard' => 'Dasbor',
'Confirmation' => 'Konfirmasi', 'Confirmation' => 'Konfirmasi',
'Allow everybody to access to this project' => 'Izinkan semua orang untuk mengakses proyek ini',
'Everybody have access to this project.' => 'Semua orang mendapat akses untuk proyek ini.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Buat komentar dari penyedia eksternal', 'Create a comment from an external provider' => 'Buat komentar dari penyedia eksternal',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flusso attività', 'Activity stream' => 'Flusso attività',
'Dashboard' => 'Bacheca', 'Dashboard' => 'Bacheca',
'Confirmation' => 'Conferma', 'Confirmation' => 'Conferma',
'Allow everybody to access to this project' => 'Abilita tutti ad accedere a questo progetto',
'Everybody have access to this project.' => 'Tutti hanno accesso a questo progetto.',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
'Create a comment from an external provider' => 'Crea un commit da un provider esterno', 'Create a comment from an external provider' => 'Crea un commit da un provider esterno',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'アクティビティストリーム', 'Activity stream' => 'アクティビティストリーム',
'Dashboard' => 'ダッシュボード', 'Dashboard' => 'ダッシュボード',
'Confirmation' => '確認', 'Confirmation' => '確認',
'Allow everybody to access to this project' => '全員にプロジェクトへのアクセスを許す',
'Everybody have access to this project.' => '誰でもこのプロジェクトにアクセスできます',
'Webhooks' => 'Webhook', 'Webhooks' => 'Webhook',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => '外部サービスからコメントを作成する', 'Create a comment from an external provider' => '外部サービスからコメントを作成する',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => '활동기록', 'Activity stream' => '활동기록',
'Dashboard' => '대시보드', 'Dashboard' => '대시보드',
'Confirmation' => '확인', 'Confirmation' => '확인',
'Allow everybody to access to this project' => '모든 사람이 이 프로젝트에 접근할 수 있도록 합니다',
'Everybody have access to this project.' => '누구나 이 프로젝트에 액세스 할 수 있습니다',
'Webhooks' => 'Webhook', 'Webhooks' => 'Webhook',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => '외부 서비스로부터 의견을 작성한다', 'Create a comment from an external provider' => '외부 서비스로부터 의견을 작성한다',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Arus aktifitas', 'Activity stream' => 'Arus aktifitas',
'Dashboard' => 'Dasbor', 'Dashboard' => 'Dasbor',
'Confirmation' => 'Konfirmasi', 'Confirmation' => 'Konfirmasi',
'Allow everybody to access to this project' => 'Memungkinkan semua orang untuk mengakses projek ini',
'Everybody have access to this project.' => 'Semua orang mendapat akses untuk projek ini.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Buat komentar dari pemasok eksternal', 'Create a comment from an external provider' => 'Buat komentar dari pemasok eksternal',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitetslogg', 'Activity stream' => 'Aktivitetslogg',
'Dashboard' => 'Hovedsiden', 'Dashboard' => 'Hovedsiden',
'Confirmation' => 'Bekreftelse', 'Confirmation' => 'Bekreftelse',
'Allow everybody to access to this project' => 'Gi alle tilgang til dette prosjektet',
'Everybody have access to this project.' => 'Alle har tilgang til dette prosjektet',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
'Create a comment from an external provider' => 'Opprett en kommentar fra en ekstern tilbyder', 'Create a comment from an external provider' => 'Opprett en kommentar fra en ekstern tilbyder',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Activiteiten', 'Activity stream' => 'Activiteiten',
'Dashboard' => 'Dashboard', 'Dashboard' => 'Dashboard',
// 'Confirmation' => '', // 'Confirmation' => '',
'Allow everybody to access to this project' => 'Geef iedereen toegang tot dit project',
'Everybody have access to this project.' => 'Iedereen heeft toegang tot dit project.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Voeg een commentaar toe van een externe provider', 'Create a comment from an external provider' => 'Voeg een commentaar toe van een externe provider',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Strumień aktywności', 'Activity stream' => 'Strumień aktywności',
'Dashboard' => 'Dashboard', 'Dashboard' => 'Dashboard',
'Confirmation' => 'Potwierdzenie', 'Confirmation' => 'Potwierdzenie',
'Allow everybody to access to this project' => 'Udostępnij ten projekt wszystkim',
'Everybody have access to this project.' => 'Wszyscy mają dostęp do tego projektu.',
'Webhooks' => 'Webhooki', 'Webhooks' => 'Webhooki',
// 'API' => '', // 'API' => '',
'Create a comment from an external provider' => 'Utwórz komentarz od zewnętrznego dostawcy', 'Create a comment from an external provider' => 'Utwórz komentarz od zewnętrznego dostawcy',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Atividades Recentes', 'Activity stream' => 'Atividades Recentes',
'Dashboard' => 'Painel de Controle', 'Dashboard' => 'Painel de Controle',
'Confirmation' => 'Confirmação', 'Confirmation' => 'Confirmação',
'Allow everybody to access to this project' => 'Permitir que todos acessem este projeto',
'Everybody have access to this project.' => 'Todos possuem acesso a este projeto.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo', 'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Atividades Recentes', 'Activity stream' => 'Atividades Recentes',
'Dashboard' => 'Painel de Controlo', 'Dashboard' => 'Painel de Controlo',
'Confirmation' => 'Confirmação', 'Confirmation' => 'Confirmação',
'Allow everybody to access to this project' => 'Permitir a todos os acesso a este projeto',
'Everybody have access to this project.' => 'Todos possuem acesso a este projeto.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo', 'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Текущая активность', 'Activity stream' => 'Текущая активность',
'Dashboard' => 'Панель управления', 'Dashboard' => 'Панель управления',
'Confirmation' => 'Подтверждение пароля', 'Confirmation' => 'Подтверждение пароля',
'Allow everybody to access to this project' => 'Разрешить любому',
'Everybody have access to this project.' => 'Любой может получить доступ к этому проекту.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Создать комментарий из внешнего источника', 'Create a comment from an external provider' => 'Создать комментарий из внешнего источника',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Spisak aktinosti', 'Activity stream' => 'Spisak aktinosti',
'Dashboard' => 'Panel', 'Dashboard' => 'Panel',
'Confirmation' => 'Potvrda', 'Confirmation' => 'Potvrda',
'Allow everybody to access to this project' => 'Dozvoli svima pristup projektu',
'Everybody have access to this project.' => 'Svima je dozvoljen pristup.',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
// 'Create a comment from an external provider' => '', // 'Create a comment from an external provider' => '',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitetsström', 'Activity stream' => 'Aktivitetsström',
'Dashboard' => 'Instrumentpanel', 'Dashboard' => 'Instrumentpanel',
'Confirmation' => 'Bekräftelse', 'Confirmation' => 'Bekräftelse',
'Allow everybody to access to this project' => 'Ge alla tillgång till projektet',
'Everybody have access to this project.' => 'Alla har tillgång till projektet',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Skapa en kommentar från en extern leverantör', 'Create a comment from an external provider' => 'Skapa en kommentar från en extern leverantör',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'กิจกรรมที่เกิดขึ้น', 'Activity stream' => 'กิจกรรมที่เกิดขึ้น',
'Dashboard' => 'แดชบอร์ด', 'Dashboard' => 'แดชบอร์ด',
'Confirmation' => 'ยืนยันรหัสผ่าน', 'Confirmation' => 'ยืนยันรหัสผ่าน',
'Allow everybody to access to this project' => 'อนุญาตให้ทุกคนเข้าถึงโปรเจคนี้',
'Everybody have access to this project.' => 'ทุกคนสามารถเข้าถึงโปรเจคนี้',
// 'Webhooks' => '', // 'Webhooks' => '',
// 'API' => '', // 'API' => '',
'Create a comment from an external provider' => 'สร้างความคิดเห็นจากบริการภายนอก', 'Create a comment from an external provider' => 'สร้างความคิดเห็นจากบริการภายนอก',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Güncel olay akışı', 'Activity stream' => 'Güncel olay akışı',
'Dashboard' => 'Pano', 'Dashboard' => 'Pano',
'Confirmation' => 'Onay', 'Confirmation' => 'Onay',
'Allow everybody to access to this project' => 'Bu projeye herkesin erişimine izin ver',
'Everybody have access to this project.' => 'Bu projeye herkesin erişimi var.',
'Webhooks' => 'Web Kancaları', 'Webhooks' => 'Web Kancaları',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Dış sağlayıcı ile bir yorum oluştur', 'Create a comment from an external provider' => 'Dış sağlayıcı ile bir yorum oluştur',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Luồng hoạt động', 'Activity stream' => 'Luồng hoạt động',
'Dashboard' => 'Bảng điều khiển', 'Dashboard' => 'Bảng điều khiển',
'Confirmation' => 'Xác nhận', 'Confirmation' => 'Xác nhận',
'Allow everybody to access to this project' => 'Cho phép mọi người truy cập vào dự án này',
'Everybody have access to this project.' => 'Mọi người đều có quyền truy cập vào dự án này.',
'Webhooks' => 'Webhooks', 'Webhooks' => 'Webhooks',
'API' => 'API', 'API' => 'API',
'Create a comment from an external provider' => 'Tạo một bình luận từ một nhà cung cấp bên ngoài', 'Create a comment from an external provider' => 'Tạo một bình luận từ một nhà cung cấp bên ngoài',

View File

@ -394,8 +394,6 @@ return array(
'Activity stream' => '动态记录', 'Activity stream' => '动态记录',
'Dashboard' => '面板', 'Dashboard' => '面板',
'Confirmation' => '确认', 'Confirmation' => '确认',
'Allow everybody to access to this project' => '允许所有人访问此项目',
'Everybody have access to this project.' => '所有人都可以访问此项目',
'Webhooks' => '网络钩子', 'Webhooks' => '网络钩子',
'API' => '应用程序接口', 'API' => '应用程序接口',
'Create a comment from an external provider' => '从外部创建一个评论', 'Create a comment from an external provider' => '从外部创建一个评论',

View File

@ -111,22 +111,6 @@ class ProjectPermissionModel extends Base
}); });
} }
/**
* Return true if everybody is allowed for the project
*
* @access public
* @param integer $project_id Project id
* @return bool
*/
public function isEverybodyAllowed($project_id)
{
return $this->db
->table(ProjectModel::TABLE)
->eq('id', $project_id)
->eq('is_everybody_allowed', 1)
->exists();
}
/** /**
* Return true if the user is allowed to access a project * Return true if the user is allowed to access a project
* *

View File

@ -44,10 +44,7 @@ class ProjectUserRoleModel extends Base
{ {
$userProjects = $this->db $userProjects = $this->db
->hashtable(ProjectModel::TABLE) ->hashtable(ProjectModel::TABLE)
->beginOr()
->eq(self::TABLE.'.user_id', $user_id) ->eq(self::TABLE.'.user_id', $user_id)
->eq(ProjectModel::TABLE.'.is_everybody_allowed', 1)
->closeOr()
->in(ProjectModel::TABLE.'.is_active', $status) ->in(ProjectModel::TABLE.'.is_active', $status)
->join(self::TABLE, 'project_id', 'id') ->join(self::TABLE, 'project_id', 'id')
->getAll(ProjectModel::TABLE.'.id', ProjectModel::TABLE.'.name'); ->getAll(ProjectModel::TABLE.'.id', ProjectModel::TABLE.'.name');
@ -70,15 +67,6 @@ class ProjectUserRoleModel extends Base
*/ */
public function getUserRole($project_id, $user_id) public function getUserRole($project_id, $user_id)
{ {
$projectInfo = $this->db->table(ProjectModel::TABLE)
->eq('id', $project_id)
->columns('owner_id', 'is_everybody_allowed')
->findOne();
if ($projectInfo['is_everybody_allowed'] == 1) {
return $projectInfo['owner_id'] == $user_id ? Role::PROJECT_MANAGER : Role::PROJECT_MEMBER;
}
$role = $this->db->table(self::TABLE)->eq('user_id', $user_id)->eq('project_id', $project_id)->findOneColumn('role'); $role = $this->db->table(self::TABLE)->eq('user_id', $user_id)->eq('project_id', $project_id)->findOneColumn('role');
if (empty($role)) { if (empty($role)) {
@ -163,10 +151,6 @@ class ProjectUserRoleModel extends Base
*/ */
public function getAssignableUsers($project_id) public function getAssignableUsers($project_id)
{ {
if ($this->projectPermissionModel->isEverybodyAllowed($project_id)) {
return $this->userModel->getActiveUsersList();
}
$userMembers = $this->db->table(self::TABLE) $userMembers = $this->db->table(self::TABLE)
->columns(UserModel::TABLE.'.id', UserModel::TABLE.'.username', UserModel::TABLE.'.name') ->columns(UserModel::TABLE.'.id', UserModel::TABLE.'.username', UserModel::TABLE.'.name')
->join(UserModel::TABLE, 'id', 'user_id') ->join(UserModel::TABLE, 'id', 'user_id')

View File

@ -68,10 +68,6 @@ class UserNotificationModel extends Base
*/ */
public function getUsersWithNotificationEnabled($project_id, $exclude_user_id = 0) public function getUsersWithNotificationEnabled($project_id, $exclude_user_id = 0)
{ {
if ($this->projectPermissionModel->isEverybodyAllowed($project_id)) {
return $this->getEverybodyWithNotificationEnabled($exclude_user_id);
}
$users = array(); $users = array();
$members = $this->getProjectUserMembersWithNotificationEnabled($project_id, $exclude_user_id); $members = $this->getProjectUserMembersWithNotificationEnabled($project_id, $exclude_user_id);
$groups = $this->getProjectGroupMembersWithNotificationEnabled($project_id, $exclude_user_id); $groups = $this->getProjectGroupMembersWithNotificationEnabled($project_id, $exclude_user_id);
@ -183,22 +179,4 @@ class UserNotificationModel extends Base
->eq(UserModel::TABLE.'.is_active', 1) ->eq(UserModel::TABLE.'.is_active', 1)
->findAll(); ->findAll();
} }
/**
* Get a list of project members with notification enabled
*
* @access private
* @param integer $exclude_user_id User id to exclude
* @return array
*/
private function getEverybodyWithNotificationEnabled($exclude_user_id)
{
return $this->db
->table(UserModel::TABLE)
->columns(UserModel::TABLE.'.id', UserModel::TABLE.'.username', UserModel::TABLE.'.name', UserModel::TABLE.'.email', UserModel::TABLE.'.language', UserModel::TABLE.'.notifications_filter')
->eq('notifications_enabled', '1')
->neq(UserModel::TABLE.'.id', $exclude_user_id)
->eq(UserModel::TABLE.'.is_active', 1)
->findAll();
}
} }

View File

@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role; use Kanboard\Core\Security\Role;
const VERSION = 124; const VERSION = 125;
function version_125(PDO $pdo)
{
$pdo->exec('ALTER TABLE projects DROP COLUMN is_everybody_allowed');
}
function version_124(PDO $pdo) function version_124(PDO $pdo)
{ {

View File

@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token; use Kanboard\Core\Security\Token;
use Kanboard\Core\Security\Role; use Kanboard\Core\Security\Role;
const VERSION = 103; const VERSION = 104;
function version_104(PDO $pdo)
{
$pdo->exec('ALTER TABLE projects DROP COLUMN is_everybody_allowed');
}
function version_103(PDO $pdo) function version_103(PDO $pdo)
{ {

View File

@ -2,36 +2,18 @@
<h2><?= t('Allowed Users') ?></h2> <h2><?= t('Allowed Users') ?></h2>
</div> </div>
<?php if ($project['is_everybody_allowed']): ?> <?= $this->render('project_permission/users', array(
<div class="alert"><?= t('Everybody have access to this project.') ?></div> 'project' => $project,
<?php else: ?> 'roles' => $roles,
<?= $this->render('project_permission/users', array( 'users' => $users,
'project' => $project, 'errors' => $errors,
'roles' => $roles, 'values' => $values,
'users' => $users, )) ?>
'errors' => $errors,
'values' => $values,
)) ?>
<?= $this->render('project_permission/groups', array( <?= $this->render('project_permission/groups', array(
'project' => $project, 'project' => $project,
'roles' => $roles, 'roles' => $roles,
'groups' => $groups, 'groups' => $groups,
'errors' => $errors, 'errors' => $errors,
'values' => $values, 'values' => $values,
)) ?> )) ?>
<?php endif ?>
<?php if ($project['is_private'] == 0): ?>
<hr/>
<form method="post" action="<?= $this->url->href('ProjectPermissionController', 'allowEverybody', array('project_id' => $project['id'])) ?>">
<?= $this->form->csrf() ?>
<?= $this->form->hidden('id', array('id' => $project['id'])) ?>
<?= $this->form->checkbox('is_everybody_allowed', t('Allow everybody to access to this project'), 1, $project['is_everybody_allowed']) ?>
<div class="form-actions">
<button type="submit" class="btn btn-blue"><?= t('Save') ?></button>
</div>
</form>
<?php endif ?>

View File

@ -17,7 +17,4 @@ Přiřazení rolí je viditelné v **Nastavení projektu > Oprávnění**:
![Oprávnění projektu](screenshots/project-permissions.png) ![Oprávnění projektu](screenshots/project-permissions.png)
Pokud se rozhodnete povolit přístup všem, budou všichni uživatelé Kanboard považováni za členy projektu.
Tímto nastavením nebude mít správa rolí žádný vliv. Oprávnění na uživatele nebo skupinu nelze použít.
U soukromých projektů nelze definovat oprávnění. U soukromých projektů nelze definovat oprávnění.

View File

@ -78,7 +78,6 @@ Response example:
"last_modified": "1438205337", "last_modified": "1438205337",
"is_public": "0", "is_public": "0",
"is_private": "1", "is_private": "1",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": null, "description": null,
@ -369,7 +368,6 @@ Response example:
"last_modified": "1436119570", "last_modified": "1436119570",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": null, "description": null,

View File

@ -70,7 +70,6 @@ Response example:
"last_modified": "1436119135", "last_modified": "1436119135",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": "test", "description": "test",
@ -119,7 +118,6 @@ Response example:
"last_modified": "1436119135", "last_modified": "1436119135",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": "test", "description": "test",
@ -168,7 +166,6 @@ Response example:
"last_modified": "1436119135", "last_modified": "1436119135",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": "test", "description": "test",
@ -217,7 +214,6 @@ Response example:
"last_modified": "1436119135", "last_modified": "1436119135",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": "test", "description": "test",
@ -265,7 +261,6 @@ Response example:
"last_modified": "1436119570", "last_modified": "1436119570",
"is_public": "0", "is_public": "0",
"is_private": "0", "is_private": "0",
"is_everybody_allowed": "0",
"default_swimlane": "Default swimlane", "default_swimlane": "Default swimlane",
"show_default_swimlane": "1", "show_default_swimlane": "1",
"description": null, "description": null,

View File

@ -17,7 +17,4 @@ Role assignments are visible in **Project Settings > Permissions**:
![Project Permissions](screenshots/project-permissions.png) ![Project Permissions](screenshots/project-permissions.png)
If you choose to allow everybody, all Kanboard users will be considered 'Project Member'.
With this setting, role management will have no effect. Permission per user or per group cannot be applied.
Private projects cannot define permissions. Private projects cannot define permissions.

View File

@ -15,8 +15,4 @@ L'assignation des rôles est disponible depuis **Paramètres du projet > Permiss
![Permissions du projet](screenshots/project-permissions.png) ![Permissions du projet](screenshots/project-permissions.png)
Si vous choisissez d'autoriser tout le monde, tous les utilisateurs de Kanboard seront considérés comme **Membre du projet**.
Ce qui signifie qu'il n'y a plus des gestion de rôles.
Les permissions par utilisateur ou par groupe ne peuvent plus être appliquées.
Les projets privés ne peuvent pas définir de permissions. Les projets privés ne peuvent pas définir de permissions.

View File

@ -37,9 +37,6 @@
Если вы выберите **Разрешить любому**, то все пользователи Канборд будут считаться участниками Проекта. В таком случае, нет необходимости назначать роли. Потому что, разрешения, назначенные пользователям и группам, на доступ к Проекту не будут работать.
Приватный проект не позволяет устанавливать разрешения. Приватный проект не позволяет устанавливать разрешения.

View File

@ -17,7 +17,4 @@ Rol atamaları ** Proje Ayarları> İzinler ** 'den ulaşılabilir:
![Project Permissions](screenshots/project-permissions.png) ![Project Permissions](screenshots/project-permissions.png)
Herkese izin vermeyi seçerseniz, tüm Kanboard kullanıcıları Proje Üyesi olarak değerlendirilecektir.
Bu da artık rol yönetimi olmadığını gösterir. Kullanıcı veya grup başına izin kullanılamaz.
Özel projeler izin tanımlayamaz. Özel projeler izin tanımlayamaz.

View File

@ -120,18 +120,6 @@ class ProjectPermissionModelTest extends Base
$this->assertEquals('Project 3', $users[0]['project_name']); $this->assertEquals('Project 3', $users[0]['project_name']);
} }
public function testEverybodyAllowed()
{
$projectModel = new ProjectModel($this->container);
$projectPermission = new ProjectPermissionModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'Project 1')));
$this->assertEquals(2, $projectModel->create(array('name' => 'Project 2', 'is_everybody_allowed' => 1)));
$this->assertFalse($projectPermission->isEverybodyAllowed(1));
$this->assertTrue($projectPermission->isEverybodyAllowed(2));
}
public function testIsUserAllowed() public function testIsUserAllowed()
{ {
$userModel = new UserModel($this->container); $userModel = new UserModel($this->container);

View File

@ -101,26 +101,6 @@ class ProjectUserRoleTest extends Base
$this->assertEquals('', $userRoleModel->getUserRole(1, 2)); $this->assertEquals('', $userRoleModel->getUserRole(1, 2));
} }
public function testGetRoleWithPublicProject()
{
$projectModel = new ProjectModel($this->container);
$userRoleModel = new ProjectUserRoleModel($this->container);
$userModel = new UserModel($this->container);
$this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'User1')));
$this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User2')));
$this->assertEquals(1, $projectModel->create(array('name' => 'Test'), 2, true));
$this->assertEquals(Role::PROJECT_MANAGER, $userRoleModel->getUserRole(1, 2));
$this->assertEquals(null, $userRoleModel->getUserRole(1, 3));
$this->assertTrue($projectModel->update(array('id' => 1, 'is_everybody_allowed' => 1)));
$this->assertEquals(Role::PROJECT_MANAGER, $userRoleModel->getUserRole(1, 2));
$this->assertEquals(Role::PROJECT_MEMBER, $userRoleModel->getUserRole(1, 3));
}
public function testGetAssignableUsersWithDisabledUsers() public function testGetAssignableUsersWithDisabledUsers()
{ {
$projectModel = new ProjectModel($this->container); $projectModel = new ProjectModel($this->container);
@ -247,59 +227,6 @@ class ProjectUserRoleTest extends Base
$this->assertEquals('admin', $users[1]); $this->assertEquals('admin', $users[1]);
} }
public function testGetAssignableUsersWithEverybodyAllowed()
{
$projectModel = new ProjectModel($this->container);
$userModel = new UserModel($this->container);
$userRoleModel = new ProjectUserRoleModel($this->container);
$this->assertEquals(1, $projectModel->create(array('name' => 'Test', 'is_everybody_allowed' => 1)));
$this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'User1')));
$this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User2')));
$this->assertEquals(4, $userModel->create(array('username' => 'user3', 'name' => 'User3')));
$this->assertEquals(5, $userModel->create(array('username' => 'user4', 'name' => 'User4')));
$users = $userRoleModel->getAssignableUsers(1);
$this->assertCount(5, $users);
$this->assertEquals('admin', $users[1]);
$this->assertEquals('User1', $users[2]);
$this->assertEquals('User2', $users[3]);
$this->assertEquals('User3', $users[4]);
$this->assertEquals('User4', $users[5]);
}
public function testGetAssignableUsersWithDisabledUsersAndEverybodyAllowed()
{
$projectModel = new ProjectModel($this->container);
$projectPermission = new ProjectPermissionModel($this->container);
$userModel = new UserModel($this->container);
$userRoleModel = new ProjectUserRoleModel($this->container);
$this->assertEquals(2, $userModel->create(array('username' => 'user1', 'name' => 'User1')));
$this->assertEquals(3, $userModel->create(array('username' => 'user2', 'name' => 'User2')));
$this->assertEquals(1, $projectModel->create(array('name' => 'Project 1', 'is_everybody_allowed' => 1)));
$this->assertTrue($projectPermission->isEverybodyAllowed(1));
$users = $userRoleModel->getAssignableUsers(1);
$this->assertCount(3, $users);
$this->assertEquals('admin', $users[1]);
$this->assertEquals('User1', $users[2]);
$this->assertEquals('User2', $users[3]);
$this->assertTrue($userModel->disable(2));
$users = $userRoleModel->getAssignableUsers(1);
$this->assertCount(2, $users);
$this->assertEquals('admin', $users[1]);
$this->assertEquals('User2', $users[3]);
}
public function testGetProjectsByUser() public function testGetProjectsByUser()
{ {
$userModel = new UserModel($this->container); $userModel = new UserModel($this->container);

View File

@ -179,55 +179,21 @@ class UserNotificationTest extends Base
$this->assertEquals('user3@here', $users[2]['email']); $this->assertEquals('user3@here', $users[2]['email']);
} }
public function testGetUsersWithNotificationsWhenEverybodyAllowed()
{
$u = new UserModel($this->container);
$p = new ProjectModel($this->container);
$n = new UserNotificationModel($this->container);
$pp = new ProjectPermissionModel($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest1', 'is_everybody_allowed' => 1)));
$this->assertTrue($pp->isEverybodyAllowed(1));
// Email + Notifications enabled
$this->assertEquals(2, $u->create(array('username' => 'user1', 'email' => 'user1@here', 'notifications_enabled' => 1)));
// No email + Notifications enabled
$this->assertEquals(3, $u->create(array('username' => 'user2', 'email' => '', 'notifications_enabled' => 1)));
// Email + Notifications enabled
$this->assertEquals(4, $u->create(array('username' => 'user3', 'email' => 'user3@here', 'notifications_enabled' => 1)));
// User disabled
$this->assertEquals(5, $u->create(array('username' => 'user4', 'email' => 'user3@here', 'notifications_enabled' => 1, 'is_active' => 0)));
// No email + notifications disabled
$this->assertEquals(6, $u->create(array('username' => 'user5')));
$users = $n->getUsersWithNotificationEnabled(1);
$this->assertNotEmpty($users);
$this->assertCount(3, $users);
$this->assertEquals('user1@here', $users[0]['email']);
$this->assertEquals('', $users[1]['email']);
$this->assertEquals('user3@here', $users[2]['email']);
}
public function testSendNotifications() public function testSendNotifications()
{ {
$u = new UserModel($this->container); $userModel = new UserModel($this->container);
$n = new UserNotificationModel($this->container); $userNotificationModel = new UserNotificationModel($this->container);
$p = new ProjectModel($this->container); $projectModel = new ProjectModel($this->container);
$tc = new TaskCreationModel($this->container); $taskCreationModel = new TaskCreationModel($this->container);
$tf = new TaskFinderModel($this->container); $taskFinderModel = new TaskFinderModel($this->container);
$pp = new ProjectPermissionModel($this->container); $projectUserRoleModel = new ProjectUserRoleModel($this->container);
$this->assertEquals(1, $p->create(array('name' => 'UnitTest1', 'is_everybody_allowed' => 1))); $this->assertEquals(1, $projectModel->create(array('name' => 'UnitTest1')));
$this->assertEquals(1, $tc->create(array('title' => 'test', 'project_id' => 1))); $this->assertEquals(1, $taskCreationModel->create(array('title' => 'test', 'project_id' => 1)));
$this->assertTrue($u->update(array('id' => 1, 'email' => 'test@localhost'))); $this->assertTrue($userModel->update(array('id' => 1, 'email' => 'test@localhost')));
$this->assertTrue($pp->isEverybodyAllowed(1)); $this->assertTrue($projectUserRoleModel->addUser(1, 1, Role::PROJECT_MANAGER));
$n->saveSettings(1, array( $userNotificationModel->saveSettings(1, array(
'notifications_enabled' => 1, 'notifications_enabled' => 1,
'notifications_filter' => UserNotificationFilterModel::FILTER_NONE, 'notifications_filter' => UserNotificationFilterModel::FILTER_NONE,
'notification_types' => array('web' => 1, 'email' => 1), 'notification_types' => array('web' => 1, 'email' => 1),
@ -259,6 +225,6 @@ class UserNotificationTest extends Base
->with($this->equalTo('web')) ->with($this->equalTo('web'))
->will($this->returnValue($notifier)); ->will($this->returnValue($notifier));
$n->sendNotifications(TaskModel::EVENT_CREATE, array('task' => $tf->getDetails(1))); $userNotificationModel->sendNotifications(TaskModel::EVENT_CREATE, array('task' => $taskFinderModel->getDetails(1)));
} }
} }