Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
intranet-timesheet2
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
1
Merge Requests
1
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-timesheet2
Commits
b80b9429
Commit
b80b9429
authored
Sep 26, 2023
by
Frank Bergmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
cosine #5722: Don't redirect admin in Home page if no hours were logged
parent
b6f34cd8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
intranet-timesheet2-procs.tcl
tcl/intranet-timesheet2-procs.tcl
+2
-2
No files found.
tcl/intranet-timesheet2-procs.tcl
View file @
b80b9429
...
...
@@ -262,7 +262,6 @@ ad_proc -public im_timesheet_home_component {user_id} {
the current project and a link to log the users hours.
}
{
if
{[
im_security_alert_check_integer -location im_timesheet_home_component -message
"SQL Injection Attempt"
-value
$user
_id
]}
{
set user_id 0
}
# skip the entire component if the user doesn't have
# the permission to log hours
set add_hours
[
im_permission
$user
_id
"add_hours"
]
...
...
@@ -271,6 +270,7 @@ ad_proc -public im_timesheet_home_component {user_id} {
set add_absences
[
im_permission
$user
_id
"add_absences"
]
set view_hours_all
[
im_permission
$user
_id view_hours_all
]
if
{
!$add_hours && !$add_absences && !$view_hours_all
}
{
return
""
}
set admin_p
[
im_is_user_site_wide_or_intranet_admin
$user
_id
]
# Get the number of hours in the number of days, and whether
# we should redirect if the user didn't log them...
...
...
@@ -307,7 +307,7 @@ ad_proc -public im_timesheet_home_component {user_id} {
"
set message
"<b>
[
lang::message::lookup
""
intranet-timesheet2.You_need_to_log_hours
$default
_message
]
</b>"
if
{
$redirect
_p
}
{
if
{
$redirect
_p
&& !$admin_p
}
{
set header
[
lang::message::lookup
""
intranet-timesheet2.Please_Log_Your_Hours
"Please Log Your Hours"
]
ad_returnredirect
[
export_vars -base
"/intranet-timesheet2/hours/index"
{
header message
}]
}
...
...
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