Access restricted to missing content types

pebosi - October 13, 2008 - 15:17
Project:View own
Version:6.x-1.1
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

Hi,

i your access list you only show content type by module "node", but for all other types like "forum" or "webform" access is restricted by default too, and there is no option to get access back...

regards pebosi

#1

djuba - October 13, 2008 - 15:24
Status:active» postponed (maintainer needs more info)

hi!

first of all, you can uninstall module, rebuild your permissions and all will be ok with your rights. There are no access management module, which influence can't be undone.

second
do you check "access content" permission?

can you provide screenshot with permissions for forum module and node module?

#2

webchuck - October 30, 2008 - 17:38

Djuba,

I noticed in view_own.module, line 33, that permissions are only set for modules of type 'node'. This restriction keeps other modules, like webform and blog, from being displayed. By removing the restriction the module will work for all content types.

Unfortunately, I don't know how to make a patch, so I'll just show the changes I made here:

Original code:

function view_own_perm() {
  foreach (node_get_types() as $type) {
    if ($type->module == 'node') {
      $perms[] = 'view own '. $type->type .' content';
      $perms[] = 'view any '. $type->type .' content';
    }
  }
  return $perms;
}

Updated code:

function view_own_perm() {
  foreach (node_get_types() as $type) {
    $perms[] = 'view own '. $type->type .' content';
    $perms[] = 'view any '. $type->type .' content';
  }
  return $perms;
}

If there's a good reason to restrict this access to types of module "node" please let me know. Otherwise, please update the module so it will work with all content types.

Chuck

#3

AltaVida - November 26, 2008 - 14:43

I agree with #2. I don't understand why this module can't be used with nodes created by blog.module, image.module or others.

#4

pebosi - January 12, 2009 - 08:50
Status:postponed (maintainer needs more info)» needs review

Created a patch for that, only removes the if statement

regards

AttachmentSize
all_nodetypes.patch 645 bytes

#5

hamaldus - March 29, 2009 - 23:38

Subscribing
Hope this gets implemented soon:)

#6

kenorb - May 27, 2009 - 14:59
Status:needs review» fixed

Committed.

#7

System Message - June 10, 2009 - 15:00
Status:fixed» closed

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

#8

SageOfCode - June 27, 2009 - 12:30

Thank you(!) for fixing this. I just ran into the same bug.
I just have two questions:

1. The fix was committed on: May 27, 2009.
Therefore, it looked like the development snap shot: 6.x-1.x-dev 2009-May-30, has this committed fix. Correct?

2. The current released version is: 6.x-1.1 2008-Sep-04.
Do you know when the nest released version will be?

Thank you in advance.

 
 

Drupal is a registered trademark of Dries Buytaert.