How to replicate:

> Create few dummy projects.
> Views module is used to create a list of Projects that a stormperson can view.
> Assign a some body as Project Manager for the project and some other person as Assiged.
> now even though the user can view the nodes by assigning permission "Storm project: view if project manager" and "Storm project: view if assigned to project", they wont be able to see it if a view is created to populate the same nodes.

The FIX:
Hang on, yes, its true, a fix will be provided by me in the comment that follows. :E Please test it and review it.

Comments

d34dman’s picture

Sorry guys could not figure out how to create a patch using git.

so am attaching the copy paste of it.

You gotta edit the stormproject.module file.


@@ -200,11 +200,11 @@ function stormproject_storm_rewrite_where_sql($query, $primary_table, $account)
     }
     if (user_access('Storm project: view if project manager')) {
       if ($cond) $cond .= ' OR ';
-      $cond .= 'spr1.manager_nid='. $account->uid;
+      $cond .= 'spr1.manager_nid='. $account->stormperson_nid;
     }
     if (user_access('Storm project: view if assigned to project')) {
       if ($cond) $cond .= ' OR ';
-      $cond .= 'spr1.assigned_nid='. $account->uid;
+      $cond .= 'spr1.assigned_nid='. $account->stormperson_nid;
       
       if (module_exists('stormteam')) {
         // Load teams that the account belongs to

d34dman’s picture

Assigned: d34dman » Unassigned
Status: Needs work » Active

setting this as active in case maintainers miss the post...

juliangb’s picture

From a quick read - this looks like a much needed bug fix.

But - afraid we need a patch for the automated testing and for us to apply. There are some instructions here - http://drupal.org/project/storm/git-instructions if you need help using git. Would be much appreciated if you could upload as a patch.

If you set the status to "Needs Review" once a patch is uploaded, then the patch will be automatically tested.

d34dman’s picture

Assigned: Unassigned » d34dman
Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new845 bytes

I was trying to create a patch using Advanced patch contributor guide. And was getting a error. Maybe because of my misunderstanding about git's branch concept. thanks to juliangb's help.

Attaching the created patch.

juliangb’s picture

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

Thanks, committed to 2.x.

Retesting patch on 1.x.

juliangb’s picture

juliangb’s picture

Status: Needs review » Fixed

Committed to 1.x.

Status: Fixed » Closed (fixed)

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

mohann2009’s picture

hi guys... i am facing this problem lately.. may i know the solution to this? please help.

d34dman’s picture

Status: Closed (fixed) » Active

Hi mohann2009,

may i know which version of storm you are using. And also few details about what you were expecting ( with screenshot/s to assist your explanation will be warmly welcomed). The reason i ask for clarification is because, i am not able to reproduce the issue.

Thanks in advance.

NB: changing status to active as a community member has reported the problem still exists.
Note To Maintainers: I am following this and intend to resolve it and if required provide a patch.

mohann2009’s picture

I used the storm-6.x-1.36 . However when i downloaded and installed just recently this "storm-6.x-1.x-dev.tar", everything is works fine.

d34dman’s picture

Status: Active » Closed (fixed)

Closing this issue as its been already fixed in latest dev release.