Here was my problem: I had users that needed to be able to FTP large audio files and use 'import audio' to create nodes out of the files. At the same time these users didn't need administer audio permission, nor did I want them to be able to change around audio settings.
Solution: Add another permission called 'import audio' and assign it to the users who needed it.
It's pretty simple to add permissions granularity in Drupal 5. I needed to allow some users to import audio without allowing them access to all the audio settings so I hacked the '/audio/contrib/import/audio_import.module' file at about line 29 (5.x-2.x-dev - )
was: 'access' => user_access('administer audio'),
now: 'access' => user_access('import audio'),
Then hacked '/audio/audio.module' file at about line 197 (5.x-2.x-dev)
was: return array('administer audio', 'create audio', 'edit own audio',
now: return array('administer audio', 'create audio', 'edit own audio', 'import audio',
I think this would be a common situation so it would be nice to have it added as a feature to this module. However, I think there might be a better place to create the new permission (i.e. in the audio_import.module) so that it wouldn't show up on the permission page unless that module was installed. I'm still new to drupal and learning the "right way" to do things.
Comments
Comment #1
drewish commentedThat's a good idea. We'd also need to change audio_api_insert() to honor the import permission rather than just checking for create permissions.