From 71763d340ee7c9f8aa53ddbf1d52c1211abb8825 Mon Sep 17 00:00:00 2001 From: Tomasz Sowa Date: Mon, 25 Jan 2010 07:04:34 +0000 Subject: [PATCH] fixed: not logged users are not allowed to remove anything (temporarily - we're waiting for the sticky bit) git-svn-id: svn://ttmath.org/publicrep/cmslu/trunk@556 e52654a7-88a9-db11-a3e9-0013d4bc506e --- core/request.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/core/request.cpp b/core/request.cpp index c317726..3ee7350 100755 --- a/core/request.cpp +++ b/core/request.cpp @@ -760,6 +760,11 @@ return true; bool Request::CanRemove(const Item & item) { + // !! temporarily (we're waiting for the sticky bit to be implemented) + // not logged users cannot remove anything + if( !request.session->puser ) + return false; + if( item.parent_id == -1 ) { // rm for the root dir