Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-core
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-core
Commits
aadc7d13
Commit
aadc7d13
authored
Sep 25, 2020
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Changed user permission:
Users without group membership can be written by anybody
parent
2357e5c1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
2 deletions
+11
-2
intranet-user-procs.tcl
tcl/intranet-user-procs.tcl
+11
-2
No files found.
tcl/intranet-user-procs.tcl
View file @
aadc7d13
...
...
@@ -62,8 +62,7 @@ ad_proc -public im_user_permissions {
}
# Get the list of profiles of user_id
(
the one to be managed
)
# together with the information if current_user_id can read/write
# it.
# together with the information if current_user_id can read/write it.
# m.group_id are all the groups to whom user_id belongs
set profile_perm_sql
"
select
...
...
@@ -81,6 +80,7 @@ ad_proc -public im_user_permissions {
and o.object_type = 'im_profile'
"
set first_loop 1
set loop_cnt 0
db_foreach profile_perm_check
$profile
_perm_sql
{
if
{
$debug
}
{
ns_log Notice
"im_user_permissions:
$group
_id: view=
$view
_p read=
$read
_p write=
$write
_p admin=
$admin
_p"
}
if
{
$first
_loop
}
{
...
...
@@ -98,6 +98,15 @@ ad_proc -public im_user_permissions {
if
{
"f"
eq
$write
_p
}
{
set write 0
}
if
{
"f"
eq
$admin
_p
}
{
set admin 0
}
set first_loop 0
incr loop_cnt
}
if
{
0 ==
$loop
_cnt
}
{
# The user is not part of any group - full write for everybody...
set view 1
set read 1
set write 1
set admin 1
}
# Myself - I can read and write its data
...
...
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