When I was on my user 1 account, it worked fine. But when I tried using a regular user account, I get this in the browser console:
GET http://localhost/drupal/date-restrictions/allowed-values/work_calendar/node%3Arequest%3A5/2014/06 403 (Forbidden) jquery-1.7.1.min.js:4
send jquery-1.7.1.min.js:4
f.extend.ajax jquery-1.7.1.min.js:4
(anonymous function) date_restrictions_datepicker.js?n8388o:35
dateRestrictionsCheckDate date_restrictions_datepicker.js?n8388o:44
d.extend._generateHTML jquery.ui.datepicker.min.js?v=1.8.7:71
d.extend._updateDatepicker jquery.ui.datepicker.min.js?v=1.8.7:39
$.datepicker._updateDatepicker jquery-ui-timepicker-addon.js?v=1.4:1426
d.extend._showDatepicker jquery.ui.datepicker.min.js?v=1.8.7:37
f.event.dispatch jquery-1.7.1.min.js:3
h.handle.i jquery-1.7.1.min.js:3
f.event.trigger jquery-1.7.1.min.js:3
I tried visiting the URL manually as user 1 and I get a JSON of dates. But if I visit the URL using a regular user account, I get a 403 page.
Comments
Comment #1
radj commentedIt seems this is a work_calendar problem. It turns out, the coding in
work_calendar_access()only looks for permission `administer all work calendars` to allow access to work calendars. Attached is an updated work_calendar.module file with additional permission `view work calendars` and related code to improve this.Comment #2
radj commentedComment #3
jonhattanI haven't had time to review this yet. Can you please provide a patch instead of a zip?
Comment #4
radj commentedFirst time submitting a patch from Git. Had to clone work_calendar repo. Sorry, not very well-versed with Drupal dev. Hehe. Attached patch.
Comment #6
jonhattanCommited. Thanks!
Comment #8
jonhattan