Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#489 Tasks dependent on view read permission

v2.15
closed
None
5
2012-09-17
2006-07-11
Danila Ulyanov
No

I am not sure why this is the case, but access to
"Tasks" is dependent on the read permissions of the
default view.

In modules/todos/index.php on line 69 read permissions
for view are determined:

$write_permission = $read_permission =
$GO_SECURITY->has_permission($GO_SECURITY->user_id,
$view['acl_read']);

If they fail, then user is not allowed in. However, the
first view is created with write permissions and no
read permissions by default, so the user does not have
read permissions. In order to fix it I changed the
lines 69 & 70 to:

$write_permission =
$GO_SECURITY->has_permission($GO_SECURITY->user_id,
$view['acl_write']);
$read_permission =
$GO_SECURITY->has_permission($GO_SECURITY->user_id,
$view['acl_read']);
if(!$read_permission && !$write_permission)

However, I am still not sure why the tasks depend upon
view permissions.

Discussion