Closed (fixed)
Project:
Workspace
Version:
4.7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
23 Apr 2006 at 01:32 UTC
Updated:
15 Jul 2009 at 17:23 UTC
Jump to comment: Most recent file
Comments
Comment #1
bomarmonk commentedAny takers on adding this functionality to Workspace? Please... with sugar on top.
Comment #2
bomarmonk commentedI can offer some small amount of $ to implement this change to the 4.7 version of workspace (small potatoes--say $20--, but I'm guessing this is a small revision for someone who knows their php). Patches?
Comment #3
sigsby commentedI have a hacked version of workspace working with simple access, though I'm not sure if I broke it for use with node_perm_byrole. I've attached my current patch, but it will probably need some cleanup and review.
Please feel free to give me feedback on the patch.
Comment #4
bomarmonk commentedThanks for the patch. I am getting errors when I first enable the patched workspace module with nodeperm_role still enabled:
include_once() [function.include]: Failed opening './modules/workspace/workspace.module' for inclusion (include_path='.;C:/Program Files/xampp/htdocs/mysite/modules/civicrm/;C:/Program Files/xampp/htdocs/mysite/modules/civicrm/\packages;.;C:\Program Files\xampp\php\pear\') in C:\Program Files\xampp\htdocs\mysite\includes\bootstrap.inc on line 487.
include_once(./modules/workspace/workspace.module) [function.include-once]: failed to open stream: Permission denied in C:\Program Files\xampp\htdocs\mysite\includes\bootstrap.inc on line 487.
I will test with simple access and see if the errors go away.
Comment #5
bomarmonk commentedAlso, workspace vanishes after this patch (I'm patching the 4.7 version of workspace): the menu dissappears and the module isn't even listed under in the access control area... I am looking forward to this feature, but I can't get this working yet. Thanks for the effort!
Comment #6
sigsby commentedI apologize, but things are extremely busy for me right now. It will be a while before I have a chance to clean up my changes and troubleshoot why my patch isn't working. In the mean time here is a full copy of the module I'm using. Versions I'm using:
Drupal = 4.7.2
Workspace = // $Id: workspace.module,v 1.21.2.7 2006/05/07 19:44:00 jvandyk Exp $
Simple Access = // $Id: simple_access.module,v 1.17.2.1 2006/02/26 21:04:02 jjeff Exp $
In this hacked version I've also added the permission "access own workspace" in the hook function workspace_perm() and modified the hook function workspace_menu() to allow only users with the new permission to view their workspace.
I'll be happy to answer any questions about the hacks in this file, I just don't have the time to spend on patching and testing this properly.
Comment #7
sigsby commentedDecided I should post a little more info on the things I've changed in the uploaded file (posted above).
I've added the permission "access own workspace" in the hook function workspace_perm(), along with changing the hook function workspace_menu() to use this new permission. This is not related to the simple_access integration.
The other changes are, I believe, all in the function workspace_list() and were done to accomplish the following:
1. modified the checks for an access module to check for nodeperm_role OR simple_access.
2. modified the query to eliminate the duplicate listings by using an sql 'GROUP BY n.nid' and then using 'SUM(na.grant_update) AS grant_update' and 'SUM(na.grant_delete) AS grant_delete'.
3. modified the listing to only show nodes for which the user has edit and/or delete permissions. I am not showing nodes for which the user has only view permissions.
4. modified the listing for comments. This was necessary for the production site I made these changes for and doesn't strictly relate to the simple access integration. I've also hacked my version of the comment module, so I'm not sure how the comment handling changes in the workspace module will affect a stock drupal install.
Comment #8
bomarmonk commentedI am testing this with simple access and Drupal 4.7. It looks like it is close to working (no more errors), but the workspace currently doesn't reflect nodes for which the user has been given "edit" permissions through simple access. The complexity for my site is that I need both taxonomy access and simple access to be working (and I'm using Robb Canefield's nodeaccess_multi module). Robb's module does allow both access modules to work well together (perhaps a bit heavy on resource consumption, but I don't have an extremely busy site). I'm wondering if this is why the changes to workspace aren't working?
Comment #9
bomarmonk commentedLet's keep this feature request alive for the 6.x version of this module. I have put in a request for this functionality as a views filter, so maybe work should be done to make workspace a views compatible module as well? I know it's a rather simple module right now, but views have become so widely used, that expanding workspace this way would benefit many.
Comment #10
bomarmonk commentedChanging title to reflect the feature request more clearly.
Comment #11
bomarmonk commentedAlso, taxonomy access and simple access should now work together in core for Drupal 5, so the node_access_multi module above is no longer an issue.
Comment #12
frank ralf commentedHi bomarkmunk,
I'm changing this back to 4.7 as there is a patch provided for that version and closing this thread. Please open a new issue if problem persists with current release.
tia
Frank