aboutsummaryrefslogtreecommitdiff
path: root/video.module
diff options
context:
space:
mode:
authorFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 22:49:16 +0000
committerFabio Varesano <fax8@13637.no-reply.drupal.org>2006-06-19 22:49:16 +0000
commit38373b18497493630ba298df1ec638655d09f8db (patch)
tree56d48a2888f761b0c63479d6f2acc11966dd5018 /video.module
parent512d567e3b66002127eb4fb96040d7979050e97b (diff)
downloadvideo-38373b18497493630ba298df1ec638655d09f8db.tar.gz
video-38373b18497493630ba298df1ec638655d09f8db.tar.bz2
Some debugging for plugins.
Patch #69330 by geodan (http://drupal.org/user/37266) Allow users to edit own videos: This patch adds an 'edit own videos' permission to allow users to edit their own video nodes without having the 'administer nodes' privelage.
Diffstat (limited to 'video.module')
-rw-r--r--video.module4
1 files changed, 3 insertions, 1 deletions
diff --git a/video.module b/video.module
index 1e687d4..cbc0251 100644
--- a/video.module
+++ b/video.module
@@ -218,7 +218,7 @@ function video_feed() {
* array of permissions
*/
function video_perm() {
- $array = array('create video', 'access video', 'administer video', 'download video', 'view play counter', 'view download counter');
+ $array = array('create video', 'access video', 'administer video', 'download video', 'view play counter', 'view download counter', 'edit own video');
return $array;
}
@@ -337,6 +337,8 @@ function video_access($op, $node) {
return $node->status; // see book.module for reference
case 'create':
return user_access('create video');
+ case 'update':
+ return user_access('edit own video') && ($user->uid == $node->uid);
}
}