I am using content access successfully on my web site. I would like to override it, however, for iCal subscriptions to events. As far as I can tell, in iCal in Mac OS X, I cannot subscribe to a calendar and login so I miss some items. I would like to pass a URL argument with the iCal request to override content access ONLY with a given URL string, for example:
www.mysite.com/calendar/2008/05/all/ical?access=all
Nothing is super private on my site but I use content access to separate family items from public items.

I know I could use meta data to hide content, such as a new CCK field to mark items as public or private and pass an argument to the view that way, but was curious if there was a way to do it with content access.

Thanks!

Comments

jthaxton’s picture

I think I sorted the update for this one out myself. I am not sure if this is the most elegant solution but again, I just wanted to login myself in through Apple's iCal to get events from my Drupal site for my personal iCal app on my computer at home. I can now pass my username and password through the URL from my computer, this really isn't the best idea and I think I should make a user who only has this level of access instead of my user but that's a next step.

The update is to l.60 of the module:

// override if the access param is present, explode on : and login user for access from ical calendar
if (isset($_GET['access'])) {
$user_params = explode(":",$_GET['access']);
$user = user_authenticate($user_params[0], trim($user_params[1]));
$return = array('content_access_author' => array($account->uid)) + $return;
}

Pass this at the end of any URL: ?access=[username]:[password]

good_man’s picture

Version: 5.x-1.3 » 7.x-1.x-dev
Issue tags: +ToDo

API for Content Access would be a ++. Marking as ToDO.

gisle’s picture

Issue summary: View changes
Status: Active » Closed (outdated)
Issue tags: -ToDo

Won't happen.