From 23ca7a2d8832aa16107cf7002c35170ae2b87a1c Mon Sep 17 00:00:00 2001 From: Dries Buytaert Date: Thu, 1 Nov 2001 17:04:20 +0000 Subject: - Another batch of updates/improvements: + introduced basic node permissions ("create", "delete", "update" and "view") at the node level: it's up to the "<$node->type>_module" to hide gory details (if any). + made the "blog it"-feature in the blog and import module work with the new node system, in specific with the new centralized forms. + made it possible to update blogs. + made the page module work with the new node system. + various smaller improvements. --- modules/story.module | 49 ++++++++++++++++++++++++++++++++++++------------- 1 file changed, 36 insertions(+), 13 deletions(-) (limited to 'modules/story.module') diff --git a/modules/story.module b/modules/story.module index 91bb9ef81..66870c076 100644 --- a/modules/story.module +++ b/modules/story.module @@ -1,11 +1,41 @@ "story"); + + return $info[$field]; +} + +function story_access($op, $node) { + + if ($op == "view") { + return $node->nid && $node->status && !$node->moderate; + } + + if ($op == "create") { + return 1; + } + + if ($op == "update") { + return user_access("administer nodes"); + } + + if ($op == "delete") { + return user_access("adminster nodes"); + } + +} + function story_help() { ?> -

Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.

-

Posted stories: published stories accessible to all visitors.

-

Dumped stories: rejected stories that are no longer available to visitors.

+/* + // TODO: update documentation, outdated + +

Queued stories: user-contributed stories are automatically whisked away to a submission queue for moderators (i.e. registered user) to frown at. Moderators vote whether or not a story should be posted to the front page for discussion.

+

Posted stories: published stories accessible to all visitors.

+

Dumped stories: rejected stories that are no longer available to visitors.

+*/ nid) { - if (user_access("administer nodes")) { - return array(); - } - else { - return 0; - } + return array(); } else { - /* - ** By default, stories get promoted to the front page and they are - ** subject to moderation. - */ return array("promote" => 1, "moderate" => 1); } + } ?> -- cgit v1.2.3