So i have a ORG-A with a PROJ-A assigned to TEAM-A, and tasks assigned to members of the team. TEAM-A has members from ORG-B. In the dashboard, when the Team members from ORB-B look at their assigned tasks they can see them, no problem. But if i try and display those tasks in a view (in a block which displays on the sidebar) they disappear. If i give the permission view all Tasks, they then can see the block, but with all of the tasks, and not just assigned. Any thoughts?

Comments

chertzog’s picture

Title: Permissions issue with Views » "My Tasks" Block without views

I was trying to think of a way around this issue, when i struck me that when the user looks at their tasks from the dashboard, everything is displayed correctly. Its just a views views permission issue that the problem, so why not exclude views from the equation?

How would you go about creating a block that just displays the task listing? Would it be as easy as pasting part of the stormtask.theme.inc into a block and seeting the input format to PHP code?

Im not skilled enough in this to do it and i get lost here: http://drupal.org/node/745356 with the argument issue.

juliangb’s picture

Views is a much better way to go rather than entering PHP code into a block.

Unfortunately I have limited time to assist at the moment but will do so when I can.

Can you assist by posting a very detailed step by step way to reproduce the original bug starting from a fresh Storm installation? If I can follow this exactly, it will help for me to reproduce, debug and fix.

chertzog’s picture

StatusFileSize
new4 KB

Ok, here are the steps:

STORM:
1. Clean install of Drupal 6.20
2. install Storm 6.x-2.x-dev and Views 6.x-2.11
3. Create role for employees that has the folowing permissions:
a. access content
b. Storm: access dashboard
c. Storm organization: access
d. Storm organization: view belonged
e. Storm person: view own
f. Storm project: access
g. Storm project: view if assigned to project
h. Storm task: view if assigned to task
i. Storm task: edit if assigned to task
j. Storm team: view belonged
k. access all views

4. Create role for manager that has the folowing permissions:
a. access content
b. Storm: access dashboard
c. Storm organization: access
d. Storm organization: view belonged
e. Storm person: view own
f. Storm project: access
g. Storm project: view if assigned to project
h. Storm task: access
i. Storm task: add
j. Storm task: edit if assigned to task
k. Storm task: edit own
l. Storm task: view if assigned to task
m. Storm task: view own
n. Storm team: view belonged
o. access all views

5. Create drupal users with respective roles.
a. Manager1
b. Manager2
b. Employee1
c. Employee2

6. Create organizations: ORG-1, ORG-2

7. Create Storm People for the users, associating their drupal user.

8. Assign Manager1, Employee1 to Org-1, and Manager2, Empoyee2 to Org-2.

9. Create Team1, with members, Employee1, Employee2, and Manager1. Yes is is a cross organization team.

10. Create Project1 under Org1, Project manager is Manager1, and Assigned to is Team1.

11. In Project 1, Create Task 1 and Task 2 and assign them to Employee1 and Employee2 respectively.

VIEWS:
1. Create My_Tasks View (attached)

BLOCKS:
1. Add My Tasks Block to right Sidebar (Garland Default Theme)

----------------------------
With the above configuration, i would expect that when the employees log in, they would see a block in the right sidebar with the tasks they are assigned to. But when they log in, there is nothing there, but if they click on tasks through /storm/tasks/, they see they ones they are assigned to. They also only see their tasks when they click on the tasks button from the project page.

--------------------------

If i give the employee role, the "Storm task: view of user organization" permission, Employee 1 sees all tasks both in the block, and the /storm/tasks/, and Employee2 sees only tasks assigned to employee1 in the block view, but sees their own in through the /storm/tasks/. Which is wierd.

If i take away the "Storm task: view of user organization", and give them the "Storm task: view all" permission, they see everything (as expected)

chertzog’s picture

I'm guessing this will be fixed when #889610: List pages to be default views is implemented.

juliangb’s picture

This will be a blocker for that issue.

The views integration is an area I am very interested in getting solved, but I don't have the time right now to push it forward.

juliangb’s picture

Title: "My Tasks" Block without views » Permissions issue with views

Reverting title

juliangb’s picture

I've reproduced and confirmed this bug. (Note to self - test site 002bw).

Am looking into it, currently unsure as to what is going on.

juliangb’s picture

Assigned: Unassigned » juliangb
Status: Active » Needs review
StatusFileSize
new585 bytes

I think this patch might solve the issue, needs testing.

juliangb’s picture

juliangb’s picture

StatusFileSize
new588 bytes

That gave errors - but I think this one works.

juliangb’s picture

Version: 6.x-2.x-dev » 6.x-1.x-dev

Committed to 2.x.

Patch for 1.x.

juliangb’s picture

StatusFileSize
new588 bytes
juliangb’s picture

Status: Needs review » Fixed

Committed to 1.x.

Status: Fixed » Closed (fixed)
Issue tags: -storm-initiative-views, -storm-6.x-2.x-to-do

Automatically closed -- issue fixed for 2 weeks with no activity.