[geeklog-cvs] geeklog: Fixed display of the edit icon in the Poll block - didn...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sun Feb 28 13:49:58 EST 2010
changeset 7765:aaa84495a848
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/aaa84495a848
user: Dirk Haun <dirk at haun-online.de>
date: Sun Feb 28 19:29:31 2010 +0100
description:
Fixed display of the edit icon in the Poll block - didn't check for polls.edit permissions
diffstat:
plugins/polls/functions.inc | 9 +++++----
public_html/docs/history | 2 ++
2 files changed, 7 insertions(+), 4 deletions(-)
diffs (38 lines):
diff -r cec75ce5daab -r aaa84495a848 plugins/polls/functions.inc
--- a/plugins/polls/functions.inc Sun Feb 28 19:08:46 2010 +0100
+++ b/plugins/polls/functions.inc Sun Feb 28 19:29:31 2010 +0100
@@ -519,7 +519,7 @@
$access = SEC_hasAccess($P['owner_id'], $P['group_id'],
$P['perm_owner'], $P['perm_group'],
$P['perm_members'], $P['perm_anon']);
- if ($access == 3) {
+ if (($access == 3) && SEC_hasRights('polls.edit')) {
$editlink = COM_createLink($LANG25[27], $_CONF['site_admin_url']
. '/plugins/polls/index.php?mode=edit&pid=' . $pid);
$poll->set_var('edit_link', $editlink);
@@ -817,9 +817,10 @@
$poll->set_var('poll_id', $pid);
$poll->set_var('num_votes', COM_numberFormat($P['voters']));
$poll->set_var('lang_votes', $LANG_POLLS['votes']);
- $access = SEC_hasAccess($P['owner_id'],$P['group_id'],$P['perm_owner'],
- $P['perm_group'],$P['perm_members'],$P['perm_anon']);
- if ($access == 3) {
+ $access = SEC_hasAccess($P['owner_id'], $P['group_id'],
+ $P['perm_owner'], $P['perm_group'],
+ $P['perm_members'], $P['perm_anon']);
+ if (($access == 3) && SEC_hasRights('polls.edit')) {
$editlink = COM_createLink($LANG25[27], $_CONF['site_admin_url']
. '/plugins/polls/index.php?mode=edit&pid=' . $pid );
$poll->set_var('edit_link', $editlink);
diff -r cec75ce5daab -r aaa84495a848 public_html/docs/history
--- a/public_html/docs/history Sun Feb 28 19:08:46 2010 +0100
+++ b/public_html/docs/history Sun Feb 28 19:29:31 2010 +0100
@@ -88,6 +88,8 @@
Polls Plugin
------------
+- Fixed display of the edit icon in the Poll block - didn't check for polls.edit
+ permissions (but wouldn't let you edit the poll) [Dirk]
- Fixed wrong "access denied" message when attempting to view comments on a poll
that the user is not allowed to view (bug #0001044) [Dirk]
- Fixed comment bar Refresh button (bug #0001044) [Dirk]
More information about the geeklog-cvs
mailing list