Users Cannot Add Links

Tagged:  

Users are currently unable to add links for a project even when given all permissions. They can see links added by the administrative user. Is this a permissions issue or something I am missing?

Only administrators or members of the owner company are authorized to manage links. There is no specific permission for managing links as you may have noticed.

Do you have a need for users of client companies to add links?

yes

Yes, we do have a need for users of client companies to add links. Would this be hard to add permissions for this?

Edit


/application/plugins/links/models/ProjectLink.class.php

Replace all lines

return $user->isAdministrator() || $user->isMemberOfOwnerCompany();

with

return $user->isProjectUser($this->getProject());

Now all users part of the project can add, edit and delete links.

I am getting this error:
"Using $this when not in object context"
on all lines that I add the replacement: "return $user->isProjectUser($this->getProject());"

My bad. $this->getProject should have been active_project(). This is the best line:

      return $user->isAdministrator() || $user->isMemberOfOwnerCompany() || $user->isProjectUser(active_project());

I have attached a new file for your convenience. This file gave no error in my setup and a project user (not an admin or member) was able to add a link.

Enjoy

AttachmentSize
ProjectLink.class.php.zip 867 bytes

and i did your fixed actually i downloaded the file you put there and it work perfect.
phpfreak
ok thanks

It works. Thank you!!!