Using Node Registration, authenticated users cannot delete or edit their own registration.
Access Denied Page / You are not authorized to access this page..
I've double check the permissions settings and it looks all good.
Any ideas on how to troubleshoot this issue ?
Thanks, Sylvain

Comments

rudiedirkx’s picture

What's the URL and how did you get there?

svanou’s picture

I created a user admin back-end.
The url is http://mydomainname/registration/29/edit

Administration can manage registration with no problems but individuals permissions for authenticated user does not seem to be working.

Also, I've installed memcache and boost lately. Could that cause a problem?

Not quite sure how to troubleshoot this one!

Should I upgrade to latest dev ?

Thanks!

rudiedirkx’s picture

I don't think memcached or boost is the problem. I've no idea what is though. You can try dev, but I don't think that'll help either =)

I've tried with 1 registration node type and a user with no roles with access can edit and cancel. I created a Views block to show me my registration while on the node page:

$view = new view();
$view->name = 'your_registration';
$view->description = '';
$view->tag = 'default';
$view->base_table = 'node_registration';
$view->human_name = 'Your registration';
$view->core = 7;
$view->api_version = '3.0';
$view->disabled = FALSE; /* Edit this to true to make a default view disabled initially */

/* Display: Master */
$handler = $view->new_display('default', 'Master', 'default');
$handler->display->display_options['title'] = 'Your registration';
$handler->display->display_options['use_more_always'] = FALSE;
$handler->display->display_options['access']['type'] = 'none';
$handler->display->display_options['cache']['type'] = 'none';
$handler->display->display_options['query']['type'] = 'views_query';
$handler->display->display_options['exposed_form']['type'] = 'basic';
$handler->display->display_options['pager']['type'] = 'none';
$handler->display->display_options['style_plugin'] = 'default';
$handler->display->display_options['row_plugin'] = 'fields';
/* Field: Node registration: E-mail */
$handler->display->display_options['fields']['email']['id'] = 'email';
$handler->display->display_options['fields']['email']['table'] = 'node_registration';
$handler->display->display_options['fields']['email']['field'] = 'email';
$handler->display->display_options['fields']['email']['label'] = '';
$handler->display->display_options['fields']['email']['element_label_colon'] = FALSE;
$handler->display->display_options['fields']['email']['link_to_node_registration'] = 0;
$handler->display->display_options['fields']['email']['link_to_node_registration_edit'] = 0;
$handler->display->display_options['fields']['email']['link_to_node_registration_email'] = 0;
/* Field: Node registration: Cancel link */
$handler->display->display_options['fields']['cancel_node_registration']['id'] = 'cancel_node_registration';
$handler->display->display_options['fields']['cancel_node_registration']['table'] = 'views_entity_node_registration';
$handler->display->display_options['fields']['cancel_node_registration']['field'] = 'cancel_node_registration';
$handler->display->display_options['fields']['cancel_node_registration']['label'] = 'Cancel';
$handler->display->display_options['fields']['cancel_node_registration']['hide_empty'] = TRUE;
/* Field: Node registration: Delete link */
$handler->display->display_options['fields']['delete_node_registration']['id'] = 'delete_node_registration';
$handler->display->display_options['fields']['delete_node_registration']['table'] = 'views_entity_node_registration';
$handler->display->display_options['fields']['delete_node_registration']['field'] = 'delete_node_registration';
$handler->display->display_options['fields']['delete_node_registration']['label'] = 'Delete';
$handler->display->display_options['fields']['delete_node_registration']['hide_empty'] = TRUE;
/* Field: Node registration: Edit link */
$handler->display->display_options['fields']['edit_node_registration']['id'] = 'edit_node_registration';
$handler->display->display_options['fields']['edit_node_registration']['table'] = 'views_entity_node_registration';
$handler->display->display_options['fields']['edit_node_registration']['field'] = 'edit_node_registration';
$handler->display->display_options['fields']['edit_node_registration']['label'] = 'Edit';
$handler->display->display_options['fields']['edit_node_registration']['hide_empty'] = TRUE;
/* Field: Node registration: View link */
$handler->display->display_options['fields']['view_node_registration']['id'] = 'view_node_registration';
$handler->display->display_options['fields']['view_node_registration']['table'] = 'views_entity_node_registration';
$handler->display->display_options['fields']['view_node_registration']['field'] = 'view_node_registration';
$handler->display->display_options['fields']['view_node_registration']['label'] = 'View';
$handler->display->display_options['fields']['view_node_registration']['hide_empty'] = TRUE;
/* Contextual filter: Node registration: Node nid */
$handler->display->display_options['arguments']['nid']['id'] = 'nid';
$handler->display->display_options['arguments']['nid']['table'] = 'node_registration';
$handler->display->display_options['arguments']['nid']['field'] = 'nid';
$handler->display->display_options['arguments']['nid']['default_action'] = 'default';
$handler->display->display_options['arguments']['nid']['default_argument_type'] = 'node';
$handler->display->display_options['arguments']['nid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['nid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['nid']['summary_options']['items_per_page'] = '25';
/* Contextual filter: Node registration: User uid */
$handler->display->display_options['arguments']['uid']['id'] = 'uid';
$handler->display->display_options['arguments']['uid']['table'] = 'node_registration';
$handler->display->display_options['arguments']['uid']['field'] = 'uid';
$handler->display->display_options['arguments']['uid']['default_action'] = 'default';
$handler->display->display_options['arguments']['uid']['default_argument_type'] = 'current_user';
$handler->display->display_options['arguments']['uid']['summary']['number_of_records'] = '0';
$handler->display->display_options['arguments']['uid']['summary']['format'] = 'default_summary';
$handler->display->display_options['arguments']['uid']['summary_options']['items_per_page'] = '25';
/* Filter criterion: Node registration: Cancelled */
$handler->display->display_options['filters']['cancelled']['id'] = 'cancelled';
$handler->display->display_options['filters']['cancelled']['table'] = 'node_registration';
$handler->display->display_options['filters']['cancelled']['field'] = 'cancelled';
$handler->display->display_options['filters']['cancelled']['value'] = '0';

/* Display: Block */
$handler = $view->new_display('block', 'Block', 'block');
$handler->display->display_options['defaults']['hide_admin_links'] = FALSE;

Maybe you can make a screenshot of the NR permissions? Or send me the databse so I can try with my codebase and your data. I don't know...

svanou’s picture

Only local images are allowed.

Also, you can have a look here :

www.rob.co.th/user/login
username: nrdrupal
passwrod: nrdrupal

I've made one booking for you so just go to your account / my reservations and you should see the link.

Thanks a lot, Sylvain

rudiedirkx’s picture

I see. Are you sure this user has access to edit or cancel their booking? I've no idea otherwise...

You can debug (if you can) the access function. You can add some echo statements after case 'cancel': in node_registration_access() in includes/node_registration.api.inc. Somewhere around here.

svanou’s picture

Status: Active » Closed (fixed)

Sorry, my bad... User could only cancel registration 1 day in advance in the settings.....That's why did not have permissions to edit or cancel.

rudiedirkx’s picture

No problem. If you feel that should've been more obvious you can make a feature request and I might improve it (if you have an idea on how).

svanou’s picture

Nope, it was obvious.. Work as expected! Thanks !

wafaa.yousef’s picture

Version: 7.x-1.9 » 7.x-1.15
Issue summary: View changes
Status: Closed (fixed) » Active

I have the same issue. I could not view, edit or delete any registration even when I am logged in as admin. The permissions are fine. But, the cancel link is fine. I access the edit and delete links from the view you provide that is with url http://siteurl/registration/3/edit?destination=node/143/node_registration
and also http://siteurl/registration/3/edit from the link sent by mail when a user registers
Do you have any solution?

Thanks

rudiedirkx’s picture

wafaa.yousef’s picture

Thanks for you quick reply. When I go to view or edit link, I get this:
In case of edit:
Page not found
The requested page "/registration/3/edit" could not be found.

In case of view:
Page not found
The requested page "/registration/5" could not be found.

rudiedirkx’s picture

Do you have Entity Registration and Node Registration both enabled?

wafaa.yousef’s picture

Yea thanks so much this was the issue once I disabled Entity Registration, the links are working now. But, another question. Delete link does not appear in the view and even when I try to add delete operation to VBO and try to execute the delete in any registration, the page loads without deleting the item. Is it normal behaviour? So it can't be deleted?

rudiedirkx’s picture

Status: Active » Closed (fixed)

To delete a registration, it has to be canceled. Maybe that's why.

wafaa.yousef’s picture

yea .. thanks it works.