Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
X
xowiki
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
xowiki
Commits
eb55b0f7
Commit
eb55b0f7
authored
Jul 18, 2013
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Updated portlet
parent
6c744cf2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
portlet.tcl
www/portlets/portlet.tcl
+16
-13
No files found.
www/portlets/portlet.tcl
View file @
eb55b0f7
...
...
@@ -82,27 +82,30 @@ parameter_list=$parameter_list
ad_script_abort
}
# -------------------------------------------------------------
# Security
# -------------------------------------------------------------
set
current_user_id
[
ad_get_user_id
]
set
any_perms_set_p
[
im_component_any_perms_set_p
]
# Get everything about the portlet
if
{
!
[
db_0or1row plugin_info
"
select *
from im_component_plugins
where plugin_id = :plugin_id
select cp.*,
im_object_permission_p(cp.plugin_id, :current_user_id, 'read') as perm
from im_component_plugins cp
where cp.plugin_id = :plugin_id
"
]}
{
ad_return_complaint 1
"Didn't find plugin #
$plugin
_id"
ad_script_abort
}
# ad_return_complaint 1 "$current_user_id - $any_perms_set_p - $perm - $plugin_name"
# -------------------------------------------------------------
# Security
# -------------------------------------------------------------
set
perm_p
[
im_object_permission -object_id
$plugin
_id
]
if
{
!$perm_p
}
{
set result
"<pre>
[
lang::message::lookup
""
intranet-core.You_dont_have_permissions_to_access_this_portlet
"
You don't have sufficient permissions to access this portlet"
]
"
doc_return 200
"text/html"
$result
ad_script_abort
if
{
$any
_perms_set_p > 0 &&
"f"
==
$perm
}
{
set result
""
ad_return_template
}
# -------------------------------------------------------------
...
...
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