[geeklog-hg] geeklog: Make sure the Admins Only block doesn't show for non-ad...
geeklog-cvs at lists.geeklog.net
geeklog-cvs at lists.geeklog.net
Sat Sep 7 22:32:08 EDT 2013
changeset 9287:b6b58ef60fa4
url: http://project.geeklog.net/cgi-bin/hgwebdir.cgi/geeklog/rev/b6b58ef60fa4
user: Tom <websitemaster at cogeco.net>
date: Sat Sep 07 22:31:50 2013 -0400
description:
Make sure the Admins Only block doesn't show for non-admin logged in users
diffstat:
public_html/lib-common.php | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (21 lines):
diff -r f7fba63957c4 -r b6b58ef60fa4 public_html/lib-common.php
--- a/public_html/lib-common.php Sat Sep 07 14:31:10 2013 -0400
+++ b/public_html/lib-common.php Sat Sep 07 22:31:50 2013 -0400
@@ -3779,8 +3779,16 @@
function COM_adminMenu( $help = '', $title = '', $position = '' )
{
$retval = '';
+
+ // This is quick so do first
+ if (COM_isAnonUser()) {
+ return $retval;
+ }
- if (!COM_isAnonUser()) {
+ $plugin_options = PLG_getAdminOptions();
+ $num_plugins = count( $plugin_options );
+
+ if( SEC_isModerator() OR SEC_hasRights( 'story.edit,block.edit,topic.edit,user.edit,plugin.edit,user.mail,syndication.edit', 'OR' ) OR ( $num_plugins > 0 ) OR SEC_hasConfigAccess()) {
$retval = COM_commandControl(true, $help, $title, $position);
}
More information about the geeklog-cvs
mailing list