def require_admin
return unless require_login
unless self.logged_in_user.admin?
- render :nothing => true, :status => 403
+ render_403
return false
end
true
if logged_in_user_membership and Permission.allowed_to_role( "%s/%s" % [ ctrl, action ], logged_in_user_membership )
return true
end
- render :nothing => true, :status => 403
+ render_403
false
end
return true if @project.is_public?
return false unless logged_in_user
return true if logged_in_user.admin? || logged_in_user_membership
- render :nothing => true, :status => 403
+ render_403
false
end
end
end
+ def render_403
+ @html_title = "403"
+ @project = nil
+ render :template => "common/403", :layout => true, :status => 403
+ return false
+ end
+
def render_404
@html_title = "404"
render :template => "common/404", :layout => true, :status => 404
--- /dev/null
+<h2>403</h2>
+
+<p><%= l(:notice_not_authorized) %></p>
+<p><a href="javascript:history.back()">Back</a></p>
notice_file_not_found: Anhang besteht nicht oder ist gelöscht worden.
notice_locking_conflict: Datum wurde von einem anderen Benutzer geändert.
notice_scm_error: Eintrag und/oder Revision besteht nicht im SVN.
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: Ihr redMine Kennwort
mail_subject_register: redMine Kontoaktivierung
notice_file_not_found: The page you were trying to access doesn't exist or has been removed.
notice_locking_conflict: Data have been updated by another user.
notice_scm_error: Entry and/or revision doesn't exist in the repository.
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: Your redMine password
mail_subject_register: redMine account activation
notice_file_not_found: La página que intentabas tener acceso no existe ni se ha quitado.
notice_locking_conflict: Data have been updated by another user.
notice_scm_error: La entrada y/o la revisión no existe en el depósito.
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: Tu contraseña del redMine
mail_subject_register: Activación de la cuenta del redMine
notice_file_not_found: La page à laquelle vous souhaitez accéder n'existe pas ou a été supprimée.
notice_locking_conflict: Les données ont été mises à jour par un autre utilisateur. Mise à jour impossible.
notice_scm_error: L'entrée et/ou la révision demandée n'existe pas dans le dépôt.
+notice_not_authorized: Vous n'êtes pas autorisés à accéder à cette page.
mail_subject_lost_password: Votre mot de passe redMine
mail_subject_register: Activation de votre compte redMine
notice_file_not_found: La pagina desiderata non esiste o è stata rimossa.
notice_locking_conflict: Le informazioni sono state modificate da un altro utente.
notice_scm_error: La risorsa e/o la versione non esistono nel repository.
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: Password redMine
mail_subject_register: Attivazione utenza redMine
notice_file_not_found: アクセスしようとしたページは存在しないか削除されています。
notice_locking_conflict: 別のユーザがデータを更新しています。
notice_scm_error: リポジトリに、エントリ/リビジョンが存在しません。
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: redMine パスワード
mail_subject_register: redMine アカウントが有効になりました
notice_file_not_found: A pagina que voce esta tentando acessar nao existe ou foi excluida.
notice_locking_conflict: Os dados foram atualizados por um outro usuario.
notice_scm_error: A entrada e/ou a revisao nao existem no repositorio.
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: Sua senha do redMine.
mail_subject_register: Ativacao de conta do redMine.
notice_file_not_found: 您访问的页面不存在或已被删除。
notice_locking_conflict: 数据已被另一个用户更新
notice_scm_error: 在版本库中不存在该条目或修订
+notice_not_authorized: You are not authorized to access this page.
mail_subject_lost_password: 您的redMine口令
mail_subject_register: redMine帐户激活