Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
mahara
mahara
Commits
e10183e9
Commit
e10183e9
authored
Jun 22, 2009
by
Nigel McNie
Browse files
Add a message to an AccessDeniedException
parent
f8a174f2
Changes
2
Hide whitespace changes
Inline
Side-by-side
htdocs/lang/en.utf8/error.php
View file @
e10183e9
...
...
@@ -88,6 +88,7 @@ $string['accessdeniedexception'] = 'You do not have access to view this page';
$string
[
'viewnotfoundexceptiontitle'
]
=
'View not found'
;
$string
[
'viewnotfoundexceptionmessage'
]
=
'You tried to access a view that didn\'t exist!'
;
$string
[
'viewnotfound'
]
=
'View with id %s not found'
;
$string
[
'youcannotviewthisusersprofile'
]
=
'You cannot view this user\'s profile'
;
$string
[
'artefactnotfoundmaybedeleted'
]
=
"Artefact with id %s not found (maybe it has been deleted already?)"
;
$string
[
'artefactnotfound'
]
=
'Artefact with id %s not found'
;
...
...
htdocs/user/view.php
View file @
e10183e9
...
...
@@ -62,7 +62,7 @@ $userobj->find_by_id($userid);
$view
=
$userobj
->
get_profile_view
();
# access will either be logged in (always) or public as well
if
(
!
$view
||
!
can_view_view
(
$view
->
get
(
'id'
)))
{
throw
new
AccessDeniedException
();
throw
new
AccessDeniedException
(
get_string
(
'youcannotviewthisusersprofile'
)
);
}
$name
=
display_name
(
$user
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment