dotProject Forums
Google
 

Go Back   dotProject Forums > DOTPROJECT VERSION 2 > Permissions
Register FAQTop Posters Members List Calendar Search Today's Posts Resend Activation Email Mark Forums Read
dotProject Documentation dotProject FAQ Bugs & Feature Requests Language Packs & Themes Download dotProject

Permissions Because the permissions system is the biggest change in 2.x we have created a special forum for discussing items.

Reply
 
Thread Tools Display Modes
  #21  
Old 22-04-08, 06:53 AM
aliban aliban is offline
Junior Member
Return Visitor
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 22-04-08
Posts: 4
Default Re: Edit Task (-), Add Task Log (+) not works

I used Mohamed's code snippet, too, for that annoying limitation with employees being able to edit the actual Task,
when I only wanted them to be able to add Task Logs (that was a real problem for me).
The code worked great and it's the first time I've 'customized' the dotProject code myself.
Thanks so much for posting that, Mohamed!
Keep it coming!

Reply With Quote
  #22  
Old 06-07-09, 08:54 PM
prabhatmaurya prabhatmaurya is offline
Junior Member
New Participant
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 06-07-09
Posts: 1
Default Re: Edit Task (-), Add Task Log (+) not works

Hi friends,
I did some changes in code to solve this problem, its working for me but it is not properly tested.

File name:- modules/tasks/view.php
Changes:-
1. There is one JavaScript function "updateTask()" above that there is one php if condition like:
if ($canEdit) {

change it to:
// Allow add task_logs
$canEdit_taskLog = getPermission('task_log', 'edit', $task_id);
if ($canEdit || $canEdit_taskLog) {


2. At the bottom of file there is one block oh php code, in that there is on if condition similar to:-
// fixed bug that dP automatically ......
if ($perms->checkModuleItem('tasks', 'edit', $task_id)) {

Changes: comment out this "if" condition but don't comment code inside if condetion.
Note:- don't forget to comment ending braces of if condetion

Now in second file-
File: modules/tasks/vw_log_update.php
1. In starting of file you can find code like:-
if (!$perms->checkModuleItem('tasks', 'edit', $task_id)) {

changes:- comment this line add code
if (!$perms->checkModuleItem('task_log', 'edit', $task_id)) {

In short change first parameter of function "tasks" to "task_log".

Note:-Please take backup of files before applying changes.

Reply With Quote
  #23  
Old 13-11-09, 10:49 PM
sevoirhun sevoirhun is offline
Junior Member
New Participant
dotProject Version:
php Version:
MySQL Version:
Operating System Version:
Browser:
 
Join Date: 13-11-09
Posts: 1
Talking Re: Edit Task (-), Add Task Log (+) not works

Quote:
Originally Posted by prabhatmaurya View Post
Hi friends,
I did some changes in code to solve this problem, its working for me but it is not properly tested.

File name:- modules/tasks/view.php
Changes:-
1. There is one JavaScript function "updateTask()" above that there is one php if condition like:
if ($canEdit) {

change it to:
// Allow add task_logs
$canEdit_taskLog = getPermission('task_log', 'edit', $task_id);
if ($canEdit || $canEdit_taskLog) {


2. At the bottom of file there is one block oh php code, in that there is on if condition similar to:-
// fixed bug that dP automatically ......
if ($perms->checkModuleItem('tasks', 'edit', $task_id)) {

Changes: comment out this "if" condition but don't comment code inside if condetion.
Note:- don't forget to comment ending braces of if condetion

Now in second file-
File: modules/tasks/vw_log_update.php
1. In starting of file you can find code like:-
if (!$perms->checkModuleItem('tasks', 'edit', $task_id)) {

changes:- comment this line add code
if (!$perms->checkModuleItem('task_log', 'edit', $task_id)) {

In short change first parameter of function "tasks" to "task_log".

Note:-Please take backup of files before applying changes.

Thanks a lot, this helped for me.

Reply With Quote
  #24  
Old 20-07-10, 09:47 PM
olivier olivier is offline
Junior Member
Return Visitor
dotProject Version: 2.1.3
php Version: 5.2
MySQL Version: 5.0
Operating System Version: Linux
Browser: Firefox
 
Join Date: 05-06-10
Posts: 5
Default Re: Edit Task (-), Add Task Log (+) not works

Just an update:
I implemented the patch proposed by prabhatmaurya.
Apparently, in DotProject 2.1.3, only the first modification is needed (the creation and test of variable $CanEdit_taskLog)

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +10. The time now is 09:09 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.