Commit graph

887 commits

Author SHA1 Message Date
Manuel Rego Casasnovas
01446a0f6a Add permissions for ROLE_SUPERUSER where ROLE_EDIT_ALL_PROJECTS is used
FEA: ItEr76S30PermissionsEnhancements
2012-06-26 11:11:12 +02:00
Manuel Rego Casasnovas
80d9f11c92 Fix columns in template assignment log tab
FEA: ItEr76S30PermissionsEnhancements
2012-06-26 11:03:44 +02:00
Manuel Rego Casasnovas
33f6ce22f3 Protect entry point in templates assignment log
FEA: ItEr76S30PermissionsEnhancements
2012-06-26 10:59:26 +02:00
Manuel Rego Casasnovas
3ede3a1b10 Fix SecurityUtils.isSuperuserOrRolePlanningOrHasAnyAuthorization
Add role ROLE_EDIT_ALL_PROJECTS to the list of roles checked.

FEA: ItEr76S30PermissionsEnhancements
2012-06-26 10:14:56 +02:00
Manuel Rego Casasnovas
a5ba940636 Protect entry point in Timesheet Lines List report
Check users permissions in order to edit the work report.

FEA: ItEr76S30PermissionsEnhancements
2012-06-26 09:19:36 +02:00
Manuel Rego Casasnovas
4f0686565d Refactor code related to timesheet lines list report
The problem was that workReportQuery.zul has copied the edition code from
workReport.zul, and we were only fixing issues in workReport.zul wich causes
that we have 2 different edition forms.

Now workReportQuery.zul only takes care of the report.

Tasks done:
* Create a new controller WorkReportQueryController
* Moved code from WorkReportCRUDController to WorkReportQueryController
* Use entry points to move between both controllers

FEA: ItEr76S30PermissionsEnhancements
2012-06-26 08:51:41 +02:00
Manuel Rego Casasnovas
e91faa776b Finally fixing users and profiles related tests changing the way to define default users
FEA: ItEr76S30PermissionsEnhancements
2012-06-25 13:13:48 +02:00
Manuel Rego Casasnovas
36414465cf New attempt to fix tests in Jenkins machine
FEA: ItEr76S30PermissionsEnhancements
2012-06-25 11:20:31 +02:00
Manuel Rego Casasnovas
a1e4ecd38d Fix tests failing on Jenkins due to new predefined users with profiles
FEA: ItEr76S30PermissionsEnhancements
2012-06-22 13:03:39 +02:00
Manuel Rego Casasnovas
9498f508b2 Fix reports to filter projects by user permissions
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 23:14:48 +02:00
Manuel Rego Casasnovas
9c990a054e Fix method SecurityUtils.isSuperuserOrRolePlanningOrHasAnyAuthorization
If user has ROLE_READ_ALL_PROJECTS it should return true too.

FEA: ItEr76S30PermissionsEnhancements
2012-06-21 17:03:09 +02:00
Manuel Rego Casasnovas
403d1fed64 Review page titles due to menu revamp
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 16:23:57 +02:00
Manuel Rego Casasnovas
a77e7c6ce1 Fix compilation issue due to class rename in commit bdf731d473
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 13:03:22 +02:00
Manuel Rego Casasnovas
c9a7fccb56 Fix wrong syntax in template.zul
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 12:34:11 +02:00
Manuel Rego Casasnovas
bdf731d473 Modified behavior of UsersBootstrapInDB in order to create users only if there are no users yet
This will work like the rest of bootstraps. Accordingly to its behavior the
class has been renamed from MandatoryUser to PredefinedUsers.

FEA: ItEr76S30PermissionsEnhancements
2012-06-21 12:34:10 +02:00
Manuel Rego Casasnovas
26d5638b41 Disable edition and removal of default user admin
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 09:47:12 +02:00
Manuel Rego Casasnovas
909a007042 Fixed some users related tests due to previous patch
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 08:39:18 +02:00
Manuel Rego Casasnovas
b26430979c Add new example users
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 08:39:18 +02:00
Manuel Rego Casasnovas
c3b5232d16 Remove default user with login user and password user
FEA: ItEr76S30PermissionsEnhancements
2012-06-21 08:07:08 +02:00
Manuel Rego Casasnovas
06293c46a0 Fix title in access_forbidden.zul
FEA: ItEr76S30PermissionsEnhancements
2012-06-20 10:53:54 +02:00
Manuel Rego Casasnovas
ff939ce249 Configure error logging to add info about the request URI if a 403 status code is returned
FEA: ItEr76S30PermissionsEnhancements
2012-06-20 10:16:54 +02:00
Manuel Rego Casasnovas
8cea09e730 Configure page when 403 (forbidden status code) is send to the user
FEA: ItEr76S30PermissionsEnhancements
2012-06-20 10:01:37 +02:00
Manuel Rego Casasnovas
eddcbca243 Add info about status code in error logging
FEA: ItEr76S04BugFixing
2012-06-20 09:57:11 +02:00
Manuel Rego Casasnovas
f933522d21 Translate into English page_not_found.zul and mark strings to be translated
FEA: ItEr76S04BugFixing
2012-06-20 09:57:11 +02:00
Manuel Rego Casasnovas
3e6d8983c9 Remove unused file error.jsp
FEA: ItEr76S04BugFixing
2012-06-20 09:02:30 +02:00
Manuel Rego Casasnovas
a1c2903476 Move index.zul to common folder
FEA: ItEr76S30PermissionsEnhancements
2012-06-20 09:01:38 +02:00
Manuel Rego Casasnovas
ecba31619c Protect monthly timesheet page depending on user roles
The page cannot be used without entry points and depending on the entry point
used one role or other will be required.

FEA: ItEr76S30PermissionsEnhancements
2012-06-20 08:58:23 +02:00
Manuel Rego Casasnovas
eb58fd31d6 Move sendForbiddenStatusCodeInHttpServletResponse method to Util class
Refactor code where SC_FORBIDDEN code was been sent and used the new method.

FEA: ItEr76S30PermissionsEnhancements
2012-06-20 08:47:32 +02:00
Manuel Rego Casasnovas
ffe537ca7b Protect entry points methods in expenses sheet window
Entry points can only be used by ROLE_BOUND_USER.

Moreover an extra checking has been added in the edit entry point to check that
the expense sheet is personal and it belongs to the worker bound to current
user.

FEA: ItEr76S30PermissionsEnhancements
2012-06-20 08:39:14 +02:00
Manuel Rego Casasnovas
bfd6e56ceb Add check to avoid bound users to go directly (via URL) to expenses page
FEA: ItEr76S30PermissionsEnhancements
2012-06-19 18:23:06 +02:00
Manuel Rego Casasnovas
19ace553f2 Bug #1468: Reload bindings only in the existing user panel
FEA: ItEr76S04BugFixing
2012-06-19 17:39:24 +02:00
Susana Montes Pedreira
a3bbc73f5d fixes the error that happens at filtering by dates in the report
about order cost per resource.

FEA: ItEr76S04BugFixing
2012-06-19 15:20:30 +01:00
Manuel Rego Casasnovas
3ffce11df7 Prevent users to create templates from project edition if they do not have ROLE_TEMPLATES
FEA: ItEr76S30PermissionsEnhancements
2012-06-19 13:56:54 +02:00
Manuel Rego Casasnovas
00ea98e5d4 Prevent users to create labels from project edition if they do not have ROLE_LABELS
FEA: ItEr76S30PermissionsEnhancements
2012-06-19 13:27:34 +02:00
Manuel Rego Casasnovas
4dee1ced71 Change column "Administrator" for "Superuser" in users list
FEA: ItEr76S30PermissionsEnhancements
2012-06-19 13:10:23 +02:00
Manuel Rego Casasnovas
41ba7fcdcb Configure initial page when user clicks on LibrePlan logo depending on roles
Different situations:
* If user has ROLE_SUPERUSER: Redirect to "Planning > Company View"
* If user has ROLE_BOUND_USER: Redirect to "Personal Area > Home"
* If user has ROLE_PLANNING: Redirect to "Planning > Company View"
* If user has read or write authorizations over any project: Redirect to "Planning > Company View"
* Otherwise: Redirect to "Personal Area > Preferences"

FEA: ItEr76S30PermissionsEnhancements
2012-06-19 12:18:54 +02:00
Manuel Rego Casasnovas
f53c943c07 Set different initial page depending on user roles
Different situations:
* If user has ROLE_SUPERUSER: It'll keep working like before, if you set a
  concrete URL you'll go to that URL, otherwise you'll go to "Planning > Company
  View"
* If user has ROLE_BOUND_USER: Go to "Personal Area > Home"
* If user has ROLE_PLANNING: Go to "Planning > Company View"
* If user has read or write authorizations over any project: Go to "Planning >
  Company View"
* Otherwise: Go to "Personal Area > Preferences"

FEA: ItEr76S30PermissionsEnhancements
2012-06-19 11:47:10 +02:00
Manuel Rego Casasnovas
37f7eac9b8 Protect main perspectives depending on user roles
* Projects Planning and Projects List: Allow access to ROLE_SUPERUSER,
  ROLE_PLANNING and users that has any project authorization.
* Resource Usage and Limiting Resources planning: Allow access to
  ROLE_SUPERUSER and ROLE_PLANNING.

FEA: ItEr76S30PermissionsEnhancements
2012-06-19 10:57:18 +02:00
Manuel Rego Casasnovas
fd5e751676 Limit visibility of planning pages depending on roles
If the user has read or write authorization over any project then the pages
"Planning > Company View" and "Planning > Projects" will be visible.

Configure properly the perspectives (tabs) in order to hide some of them if user
is not ROLE_SUPERUSER or ROLE_PLANNING.

FEA: ItEr76S30PermissionsEnhancements
2012-06-19 09:44:59 +02:00
Susana Montes Pedreira
9080e7ecb4 implements an empty method called "beforeSaving" in the GenericRESTService
and overrides it in the ExpenseSheetServiceRest in order to save the sum
of expenses.

FEA: ItEr76S22ExpenseTrackingSystem
2012-06-18 09:00:56 +01:00
Susana Montes Pedreira
99d7a69885 fixes the empty block with the apropriate condition and the
needed behaviour.

FEA: ItEr76S22ExpenseTrackingSystem
2012-06-17 13:43:27 +01:00
Susana Montes Pedreira
fbad40f945 removes the validation in the method toDTO because there is already
the annotation @NotEmpty in the ExpenseSheet class.

FEA: ItEr76S22ExpenseTrackingSystem
2012-06-17 13:33:28 +01:00
Susana Montes Pedreira
79fe7d3bb4 renames this method getLabel to getExpenseSheet in IExpenseSheetService.
FEA: ItEr76S22ExpenseTrackingSystem
2012-06-17 13:29:36 +01:00
Susana Montes Pedreira
57f23e37fe changes the InstanceNotFoundException to ValidationException and if
the entity is not found the function returns a null.

FEA: ItEr76S22ExpenseTrackingSystem
2012-06-17 13:21:34 +01:00
Susana Montes Pedreira
5386c1eec5 update the end date of the subcontracted task according to the end date
communication sent by the subcontractor.

FEA: ItEr76S21UpdateEndDateToCustomer
2012-06-17 12:25:28 +01:00
Manuel Rego Casasnovas
6e9b96b77a Remove ROLE_BOUND_USER from roles list in user and profile edition
If a user has this role the remove button will appear disabled.

FEA: ItEr76S30PermissionsEnhancements
2012-06-15 15:23:29 +02:00
Manuel Rego Casasnovas
081d70d0c7 Disable buttons to go to user or worker edition in bound users depending on roles
FEA: ItEr76S30PermissionsEnhancements
2012-06-15 15:23:29 +02:00
Manuel Rego Casasnovas
b6889f7e7b Configure permissions for ROLE_BOUND_USER
Only bound users will have access to page "Personal Area > Home".

Moreover bound users will have access to expenses sheet edition form, even if
they don't have access to "Cost > Expenses" page.

Finally users with role ROLE_SUERUSER, ROLE_SUERUSER or ROLE_TIMESHEETS will
have access to monthly timesheets edition page.

FEA: ItEr76S30PermissionsEnhancements
2012-06-15 15:23:29 +02:00
Manuel Rego Casasnovas
787355428a Managing special role ROLE_BOUND_USER in workers and users windows
All bound users must have the role ROLE_BOUND_USER.

FEA: ItEr76S30PermissionsEnhancements
2012-06-15 15:23:29 +02:00
Manuel Rego Casasnovas
9dfa1ea931 Show menus entries depending on user roles
FEA: ItEr76S30PermissionsEnhancements
2012-06-15 15:23:29 +02:00