From 06d53ffe00f903abba42a6122d96e4c462d32337 Mon Sep 17 00:00:00 2001 From: Romain Louis Date: Fri, 9 Nov 2007 01:10:45 +0000 Subject: [PATCH] canEdit function adding for the language saving works git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@44537 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- security/Member.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/security/Member.php b/security/Member.php index 396a0bfae..9247be68b 100644 --- a/security/Member.php +++ b/security/Member.php @@ -753,6 +753,14 @@ class Member extends DataObject { Database::alteration_message("Added admin account","created"); } } + + function canEdit() { + if( $this->ID == Member::currentUserID() ) + return true; + if( $member = Member::currentUser() ) + return $member->can( 'AdminCMS' ); + return false; + } }