summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorFrederic Guillot <fred@kanboard.net>2017-10-27 16:16:11 -0700
committerFrederic Guillot <fred@kanboard.net>2017-10-27 16:16:11 -0700
commitcc6618901bc927558dc159ac0dbec1159231c5f1 (patch)
treef1c14931ab88c0056e538e6d62cd1fa667d94a0d /app
parent0b9c3b0a5b61a61faf9061e040e072e4b198f6d2 (diff)
Remove feature "Allow everybody to access to this project"
Diffstat (limited to 'app')
-rw-r--r--app/Controller/ProjectPermissionController.php19
-rw-r--r--app/Locale/bs_BA/translations.php2
-rw-r--r--app/Locale/ca_ES/translations.php2
-rw-r--r--app/Locale/cs_CZ/translations.php2
-rw-r--r--app/Locale/da_DK/translations.php2
-rw-r--r--app/Locale/de_DE/translations.php2
-rw-r--r--app/Locale/el_GR/translations.php2
-rw-r--r--app/Locale/es_ES/translations.php2
-rw-r--r--app/Locale/fi_FI/translations.php2
-rw-r--r--app/Locale/fr_FR/translations.php2
-rw-r--r--app/Locale/hr_HR/translations.php2
-rw-r--r--app/Locale/hu_HU/translations.php2
-rw-r--r--app/Locale/id_ID/translations.php2
-rw-r--r--app/Locale/it_IT/translations.php2
-rw-r--r--app/Locale/ja_JP/translations.php2
-rw-r--r--app/Locale/ko_KR/translations.php2
-rw-r--r--app/Locale/my_MY/translations.php2
-rw-r--r--app/Locale/nb_NO/translations.php2
-rw-r--r--app/Locale/nl_NL/translations.php2
-rw-r--r--app/Locale/pl_PL/translations.php2
-rw-r--r--app/Locale/pt_BR/translations.php2
-rw-r--r--app/Locale/pt_PT/translations.php2
-rw-r--r--app/Locale/ru_RU/translations.php2
-rw-r--r--app/Locale/sr_Latn_RS/translations.php2
-rw-r--r--app/Locale/sv_SE/translations.php2
-rw-r--r--app/Locale/th_TH/translations.php2
-rw-r--r--app/Locale/tr_TR/translations.php2
-rw-r--r--app/Locale/vi_VN/translations.php2
-rw-r--r--app/Locale/zh_CN/translations.php2
-rw-r--r--app/Model/ProjectPermissionModel.php16
-rw-r--r--app/Model/ProjectUserRoleModel.php16
-rw-r--r--app/Model/UserNotificationModel.php22
-rw-r--r--app/Schema/Mysql.php7
-rw-r--r--app/Schema/Postgres.php7
-rw-r--r--app/Template/project_permission/index.php46
35 files changed, 26 insertions, 163 deletions
diff --git a/app/Controller/ProjectPermissionController.php b/app/Controller/ProjectPermissionController.php
index 56777b25..d043d3ec 100644
--- a/app/Controller/ProjectPermissionController.php
+++ b/app/Controller/ProjectPermissionController.php
@@ -60,25 +60,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
*
* @access public
diff --git a/app/Locale/bs_BA/translations.php b/app/Locale/bs_BA/translations.php
index 4c5461e6..b576af09 100644
--- a/app/Locale/bs_BA/translations.php
+++ b/app/Locale/bs_BA/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Spisak aktivnosti',
'Dashboard' => 'Panel',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Napravi komentar preko vanjskog posrednika',
diff --git a/app/Locale/ca_ES/translations.php b/app/Locale/ca_ES/translations.php
index b109b894..bb8dc50b 100644
--- a/app/Locale/ca_ES/translations.php
+++ b/app/Locale/ca_ES/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Fluxe d\'activitat',
'Dashboard' => 'Panell',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Crear un comentari d\'un proveïdor extern',
diff --git a/app/Locale/cs_CZ/translations.php b/app/Locale/cs_CZ/translations.php
index bef1a201..2e729175 100644
--- a/app/Locale/cs_CZ/translations.php
+++ b/app/Locale/cs_CZ/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Přehled aktivit',
'Dashboard' => 'Nástěnka',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Vytvořit komentář pomocí externího poskytovatele',
diff --git a/app/Locale/da_DK/translations.php b/app/Locale/da_DK/translations.php
index cc2ffc01..112be172 100644
--- a/app/Locale/da_DK/translations.php
+++ b/app/Locale/da_DK/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitets strøm',
'Dashboard' => 'Dashboard',
'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' => '',
// 'API' => '',
// 'Create a comment from an external provider' => '',
diff --git a/app/Locale/de_DE/translations.php b/app/Locale/de_DE/translations.php
index 964e05d2..b06b3721 100644
--- a/app/Locale/de_DE/translations.php
+++ b/app/Locale/de_DE/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Letzte Aktivitäten',
'Dashboard' => 'Dashboard',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Kommentar eines externen Providers hinzufügen',
diff --git a/app/Locale/el_GR/translations.php b/app/Locale/el_GR/translations.php
index 0e9bea51..9fb2a41e 100644
--- a/app/Locale/el_GR/translations.php
+++ b/app/Locale/el_GR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Ροή δραστηριότητας',
'Dashboard' => 'Κεντρικό ταμπλό',
'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' => 'Δημιουργήστε ένα σχόλιο από έναν εξωτερικό πάροχο',
diff --git a/app/Locale/es_ES/translations.php b/app/Locale/es_ES/translations.php
index b3ef338d..0490e466 100644
--- a/app/Locale/es_ES/translations.php
+++ b/app/Locale/es_ES/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flujo de actividad',
'Dashboard' => 'Tablero',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Crear un comentario a partir de un proveedor externo',
diff --git a/app/Locale/fi_FI/translations.php b/app/Locale/fi_FI/translations.php
index 9607a8f7..27ff0eed 100644
--- a/app/Locale/fi_FI/translations.php
+++ b/app/Locale/fi_FI/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Toiminta',
'Dashboard' => 'Työpöytä',
'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' => '',
// 'API' => '',
// 'Create a comment from an external provider' => '',
diff --git a/app/Locale/fr_FR/translations.php b/app/Locale/fr_FR/translations.php
index 12161219..830cb5c3 100644
--- a/app/Locale/fr_FR/translations.php
+++ b/app/Locale/fr_FR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flux d\'activité',
'Dashboard' => 'Tableau de bord',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Créer un commentaire depuis un fournisseur externe',
diff --git a/app/Locale/hr_HR/translations.php b/app/Locale/hr_HR/translations.php
index 5647603a..2eeb5bb0 100644
--- a/app/Locale/hr_HR/translations.php
+++ b/app/Locale/hr_HR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Popis aktivnosti',
'Dashboard' => 'Nadzorna ploča',
'Confirmation' => 'Potvrda',
- 'Allow everybody to access to this project' => 'Dozvoli svima pristup projektu',
- 'Everybody have access to this project.' => 'Svima je dozvoljen pristup.',
// 'Webhooks' => '',
// 'API' => '',
// 'Create a comment from an external provider' => '',
diff --git a/app/Locale/hu_HU/translations.php b/app/Locale/hu_HU/translations.php
index ac33e389..c19a9b5a 100644
--- a/app/Locale/hu_HU/translations.php
+++ b/app/Locale/hu_HU/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Legutóbbi tevékenységek',
'Dashboard' => 'Vezérlőpult',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Megjegyzés létrehozása külső felhasználótól',
diff --git a/app/Locale/id_ID/translations.php b/app/Locale/id_ID/translations.php
index 62e6ca04..4f922752 100644
--- a/app/Locale/id_ID/translations.php
+++ b/app/Locale/id_ID/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Arus aktifitas',
'Dashboard' => 'Dasbor',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Buat komentar dari penyedia eksternal',
diff --git a/app/Locale/it_IT/translations.php b/app/Locale/it_IT/translations.php
index 9f045d8e..1c2b7144 100644
--- a/app/Locale/it_IT/translations.php
+++ b/app/Locale/it_IT/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Flusso attività',
'Dashboard' => 'Bacheca',
'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' => '',
// 'API' => '',
'Create a comment from an external provider' => 'Crea un commit da un provider esterno',
diff --git a/app/Locale/ja_JP/translations.php b/app/Locale/ja_JP/translations.php
index f25f25fa..a78b69dd 100644
--- a/app/Locale/ja_JP/translations.php
+++ b/app/Locale/ja_JP/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'アクティビティストリーム',
'Dashboard' => 'ダッシュボード',
'Confirmation' => '確認',
- 'Allow everybody to access to this project' => '全員にプロジェクトへのアクセスを許す',
- 'Everybody have access to this project.' => '誰でもこのプロジェクトにアクセスできます',
'Webhooks' => 'Webhook',
'API' => 'API',
'Create a comment from an external provider' => '外部サービスからコメントを作成する',
diff --git a/app/Locale/ko_KR/translations.php b/app/Locale/ko_KR/translations.php
index d1aec37c..fa75667e 100644
--- a/app/Locale/ko_KR/translations.php
+++ b/app/Locale/ko_KR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => '활동기록',
'Dashboard' => '대시보드',
'Confirmation' => '확인',
- 'Allow everybody to access to this project' => '모든 사람이 이 프로젝트에 접근할 수 있도록 합니다',
- 'Everybody have access to this project.' => '누구나 이 프로젝트에 액세스 할 수 있습니다',
'Webhooks' => 'Webhook',
'API' => 'API',
'Create a comment from an external provider' => '외부 서비스로부터 의견을 작성한다',
diff --git a/app/Locale/my_MY/translations.php b/app/Locale/my_MY/translations.php
index 962943e2..62aeecad 100644
--- a/app/Locale/my_MY/translations.php
+++ b/app/Locale/my_MY/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Arus aktifitas',
'Dashboard' => 'Dasbor',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Buat komentar dari pemasok eksternal',
diff --git a/app/Locale/nb_NO/translations.php b/app/Locale/nb_NO/translations.php
index 9802daf1..3445cb5f 100644
--- a/app/Locale/nb_NO/translations.php
+++ b/app/Locale/nb_NO/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitetslogg',
'Dashboard' => 'Hovedsiden',
'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' => '',
// 'API' => '',
'Create a comment from an external provider' => 'Opprett en kommentar fra en ekstern tilbyder',
diff --git a/app/Locale/nl_NL/translations.php b/app/Locale/nl_NL/translations.php
index 485a041d..0a3706c8 100644
--- a/app/Locale/nl_NL/translations.php
+++ b/app/Locale/nl_NL/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Activiteiten',
'Dashboard' => 'Dashboard',
// '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',
'API' => 'API',
'Create a comment from an external provider' => 'Voeg een commentaar toe van een externe provider',
diff --git a/app/Locale/pl_PL/translations.php b/app/Locale/pl_PL/translations.php
index e2a2be6f..58bcbb46 100644
--- a/app/Locale/pl_PL/translations.php
+++ b/app/Locale/pl_PL/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Strumień aktywności',
'Dashboard' => 'Dashboard',
'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',
// 'API' => '',
'Create a comment from an external provider' => 'Utwórz komentarz od zewnętrznego dostawcy',
diff --git a/app/Locale/pt_BR/translations.php b/app/Locale/pt_BR/translations.php
index 74cbed04..20a2f983 100644
--- a/app/Locale/pt_BR/translations.php
+++ b/app/Locale/pt_BR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Atividades Recentes',
'Dashboard' => 'Painel de Controle',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo',
diff --git a/app/Locale/pt_PT/translations.php b/app/Locale/pt_PT/translations.php
index 7448be5b..9d5d5efe 100644
--- a/app/Locale/pt_PT/translations.php
+++ b/app/Locale/pt_PT/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Atividades Recentes',
'Dashboard' => 'Painel de Controlo',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Criar um comentário por meio de um serviço externo',
diff --git a/app/Locale/ru_RU/translations.php b/app/Locale/ru_RU/translations.php
index 9718b976..3e7d8a02 100644
--- a/app/Locale/ru_RU/translations.php
+++ b/app/Locale/ru_RU/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Текущая активность',
'Dashboard' => 'Панель управления',
'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' => 'Создать комментарий из внешнего источника',
diff --git a/app/Locale/sr_Latn_RS/translations.php b/app/Locale/sr_Latn_RS/translations.php
index f9c2e5f4..0173b8fd 100644
--- a/app/Locale/sr_Latn_RS/translations.php
+++ b/app/Locale/sr_Latn_RS/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Spisak aktinosti',
'Dashboard' => 'Panel',
'Confirmation' => 'Potvrda',
- 'Allow everybody to access to this project' => 'Dozvoli svima pristup projektu',
- 'Everybody have access to this project.' => 'Svima je dozvoljen pristup.',
// 'Webhooks' => '',
// 'API' => '',
// 'Create a comment from an external provider' => '',
diff --git a/app/Locale/sv_SE/translations.php b/app/Locale/sv_SE/translations.php
index 11c45345..8522072f 100644
--- a/app/Locale/sv_SE/translations.php
+++ b/app/Locale/sv_SE/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Aktivitetsström',
'Dashboard' => 'Instrumentpanel',
'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',
'API' => 'API',
'Create a comment from an external provider' => 'Skapa en kommentar från en extern leverantör',
diff --git a/app/Locale/th_TH/translations.php b/app/Locale/th_TH/translations.php
index a092657c..1cf74352 100644
--- a/app/Locale/th_TH/translations.php
+++ b/app/Locale/th_TH/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'กิจกรรมที่เกิดขึ้น',
'Dashboard' => 'แดชบอร์ด',
'Confirmation' => 'ยืนยันรหัสผ่าน',
- 'Allow everybody to access to this project' => 'อนุญาตให้ทุกคนเข้าถึงโปรเจคนี้',
- 'Everybody have access to this project.' => 'ทุกคนสามารถเข้าถึงโปรเจคนี้',
// 'Webhooks' => '',
// 'API' => '',
'Create a comment from an external provider' => 'สร้างความคิดเห็นจากบริการภายนอก',
diff --git a/app/Locale/tr_TR/translations.php b/app/Locale/tr_TR/translations.php
index fb44d346..e049d286 100644
--- a/app/Locale/tr_TR/translations.php
+++ b/app/Locale/tr_TR/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Güncel olay akışı',
'Dashboard' => 'Pano',
'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ı',
'API' => 'API',
'Create a comment from an external provider' => 'Dış sağlayıcı ile bir yorum oluştur',
diff --git a/app/Locale/vi_VN/translations.php b/app/Locale/vi_VN/translations.php
index cd3d6aea..35984b9b 100644
--- a/app/Locale/vi_VN/translations.php
+++ b/app/Locale/vi_VN/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => 'Luồng hoạt động',
'Dashboard' => 'Bảng điều khiể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',
'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',
diff --git a/app/Locale/zh_CN/translations.php b/app/Locale/zh_CN/translations.php
index 6e4523b1..8d51fa9f 100644
--- a/app/Locale/zh_CN/translations.php
+++ b/app/Locale/zh_CN/translations.php
@@ -394,8 +394,6 @@ return array(
'Activity stream' => '动态记录',
'Dashboard' => '面板',
'Confirmation' => '确认',
- 'Allow everybody to access to this project' => '允许所有人访问此项目',
- 'Everybody have access to this project.' => '所有人都可以访问此项目',
'Webhooks' => '网络钩子',
'API' => '应用程序接口',
'Create a comment from an external provider' => '从外部创建一个评论',
diff --git a/app/Model/ProjectPermissionModel.php b/app/Model/ProjectPermissionModel.php
index 752913d7..d1351a6c 100644
--- a/app/Model/ProjectPermissionModel.php
+++ b/app/Model/ProjectPermissionModel.php
@@ -112,22 +112,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
*
* @param integer $project_id
diff --git a/app/Model/ProjectUserRoleModel.php b/app/Model/ProjectUserRoleModel.php
index a95cf5d9..dc4add34 100644
--- a/app/Model/ProjectUserRoleModel.php
+++ b/app/Model/ProjectUserRoleModel.php
@@ -44,10 +44,7 @@ class ProjectUserRoleModel extends Base
{
$userProjects = $this->db
->hashtable(ProjectModel::TABLE)
- ->beginOr()
->eq(self::TABLE.'.user_id', $user_id)
- ->eq(ProjectModel::TABLE.'.is_everybody_allowed', 1)
- ->closeOr()
->in(ProjectModel::TABLE.'.is_active', $status)
->join(self::TABLE, 'project_id', 'id')
->getAll(ProjectModel::TABLE.'.id', ProjectModel::TABLE.'.name');
@@ -70,15 +67,6 @@ class ProjectUserRoleModel extends Base
*/
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');
if (empty($role)) {
@@ -163,10 +151,6 @@ class ProjectUserRoleModel extends Base
*/
public function getAssignableUsers($project_id)
{
- if ($this->projectPermissionModel->isEverybodyAllowed($project_id)) {
- return $this->userModel->getActiveUsersList();
- }
-
$userMembers = $this->db->table(self::TABLE)
->columns(UserModel::TABLE.'.id', UserModel::TABLE.'.username', UserModel::TABLE.'.name')
->join(UserModel::TABLE, 'id', 'user_id')
diff --git a/app/Model/UserNotificationModel.php b/app/Model/UserNotificationModel.php
index d77526f6..9e90cf5d 100644
--- a/app/Model/UserNotificationModel.php
+++ b/app/Model/UserNotificationModel.php
@@ -68,10 +68,6 @@ class UserNotificationModel extends Base
*/
public function getUsersWithNotificationEnabled($project_id, $exclude_user_id = 0)
{
- if ($this->projectPermissionModel->isEverybodyAllowed($project_id)) {
- return $this->getEverybodyWithNotificationEnabled($exclude_user_id);
- }
-
$users = array();
$members = $this->getProjectUserMembersWithNotificationEnabled($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)
->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();
- }
}
diff --git a/app/Schema/Mysql.php b/app/Schema/Mysql.php
index 20ef0080..ca284f47 100644
--- a/app/Schema/Mysql.php
+++ b/app/Schema/Mysql.php
@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
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)
{
diff --git a/app/Schema/Postgres.php b/app/Schema/Postgres.php
index a5b52b2b..312b1dba 100644
--- a/app/Schema/Postgres.php
+++ b/app/Schema/Postgres.php
@@ -8,7 +8,12 @@ use PDO;
use Kanboard\Core\Security\Token;
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)
{
diff --git a/app/Template/project_permission/index.php b/app/Template/project_permission/index.php
index 689966b6..52a69fb5 100644
--- a/app/Template/project_permission/index.php
+++ b/app/Template/project_permission/index.php
@@ -2,36 +2,18 @@
<h2><?= t('Allowed Users') ?></h2>
</div>
-<?php if ($project['is_everybody_allowed']): ?>
- <div class="alert"><?= t('Everybody have access to this project.') ?></div>
-<?php else: ?>
- <?= $this->render('project_permission/users', array(
- 'project' => $project,
- 'roles' => $roles,
- 'users' => $users,
- 'errors' => $errors,
- 'values' => $values,
- )) ?>
+<?= $this->render('project_permission/users', array(
+ 'project' => $project,
+ 'roles' => $roles,
+ 'users' => $users,
+ 'errors' => $errors,
+ 'values' => $values,
+)) ?>
- <?= $this->render('project_permission/groups', array(
- 'project' => $project,
- 'roles' => $roles,
- 'groups' => $groups,
- 'errors' => $errors,
- '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 ?>
+<?= $this->render('project_permission/groups', array(
+ 'project' => $project,
+ 'roles' => $roles,
+ 'groups' => $groups,
+ 'errors' => $errors,
+ 'values' => $values,
+)) ?>