Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Controller/Component/PermissionComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public function startup(Controller $controller) {
}

//if ($controller->Auth->user('id')) {
throw new ForbiddenException(__d('net_commons', 'Permission denied'));
throw new ForbiddenException('Permission denied');
//} else {
// return $controller->redirect($controller->Auth->redirect());
//}
Expand Down
5 changes: 3 additions & 2 deletions Error/NetCommonsExceptionRenderer.php
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ public function error400($error) {
if ($message === 'The request has been black-holed') {
$message = __d('net_commons', 'The request has been black-holed');
$redirect = $this->controller->request->referer(true);
} elseif (get_class($error) === 'ForbiddenException' &&
! in_array($this->controller->request->params['action'], ['download'], true)) {
} elseif ($message === 'Permission denied' ||
in_array($this->controller->params['action'], ['index', 'view'])) {
$message = __d('net_commons', 'Permission denied');
$redirect = Router::url('/auth/login');
$this->controller->Session->destroy();
if (! $this->controller->request->is('ajax')) {
Expand Down
6 changes: 3 additions & 3 deletions Locale/jpn/LC_MESSAGES/net_commons.po
Original file line number Diff line number Diff line change
Expand Up @@ -359,7 +359,7 @@ msgstr "削除"

#: AccessCounters/View/AccessCounterBlocks/index.ctp:43
msgid "Created datetime"
msgstr "作成日時"
msgstr "作成日"

msgid "Created user"
msgstr "作成者"
Expand All @@ -375,7 +375,7 @@ msgid "Updated date"
msgstr "更新日"

msgid "Modified datetime"
msgstr "更新日時"
msgstr "更新日"

msgid "Modified user"
msgstr "更新者"
Expand Down Expand Up @@ -585,7 +585,7 @@ msgstr "承認する"

#: Comments/View/Elements/form.ctp:19;27
msgid "Comments to the person in charge."
msgstr "担当者へのコメント"
msgstr "担当者への連絡"


#
Expand Down