Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-simple-survey
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
project-open
intranet-simple-survey
Commits
c088df0e
Commit
c088df0e
authored
Jun 30, 2010
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- extended permissions to work with ]po[ object permissions
of the related_object_id of the survey response
parent
f82c25fd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
35 additions
and
2 deletions
+35
-2
one-response.tcl
www/one-response.tcl
+35
-2
No files found.
www/one-response.tcl
View file @
c088df0e
...
...
@@ -13,6 +13,8 @@ ad_page_contract {
response_id:integer
}
set current_user_id
[
ad_maybe_redirect_for_registration
]
# -----------------------------------------------------------------
# Basic survey information and security
...
...
@@ -34,10 +36,41 @@ set survey_exists_p [db_0or1row response_info "
if
{
!$survey_exists_p
}
{
ad_return_error
"Not Found"
"Could not find survey #
$survey
_id"
return
ad_script_abort
}
ad_require_permission
$survey
_id survsimp_admin_survey
# -----------------------------------------------------------------
# Permissions
if
{
""
==
$related
_object_id
}
{
# This is a survey response not related to a ]po
[
# object, so use the standard SurvSimp permissions:
ad_require_permission
$survey
_id survsimp_admin_survey
}
else
{
# This survey response is related to a ]po
[
objects.
# Check if the current user can read this object:
# Default permissions
set object_view 0
set object_read 0
set object_write 0
set object_admin 0
catch
{
set object_type
[
db_string acs_object_type
"select object_type from acs_objects where object_id = :related_object_id"
]
set perm_cmd
"
${object_type}
_permissions
\$
current_user_id
\$
related_object_id object_view object_read object_write object_admin"
eval
$perm
_cmd
}
err_msg
if
{
!$object_read
}
{
ad_return_complaint 1
"<li>
[
_ intranet-core.lt_You_have_insufficient_6
]
"
ad_script_abort
}
}
# -----------------------------------------------------------------
...
...
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