This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -324,9 +324,9 @@ public function removeitemAction()
324324 {
325325 throw new Zend_Exception ("The item doesn't exist. " );
326326 }
327- elseif (!$ this ->Folder ->policyCheck ($ folder , $ this ->userSession ->Dao , MIDAS_POLICY_ADMIN ))
327+ elseif (!$ this ->Folder ->policyCheck ($ folder , $ this ->userSession ->Dao , MIDAS_POLICY_WRITE ))
328328 {
329- throw new Zend_Exception ('Admin permission on folder required ' );
329+ throw new Zend_Exception ('Write permission on folder required ' );
330330 }
331331 elseif (!$ this ->Item ->policyCheck ($ item , $ this ->userSession ->Dao , MIDAS_POLICY_ADMIN ))
332332 {
Original file line number Diff line number Diff line change @@ -217,9 +217,10 @@ midas.removeItem = function (id) {
217217 $ . post ( json . global . webroot + '/folder/removeitem' ,
218218 { folderId : folderId , itemId : id } ,
219219 function ( data ) {
220- jsonResponse = jQuery . parseJSON ( data ) ;
221- if ( jsonResponse == null ) {
222- midas . createNotice ( 'Error' , 4000 ) ;
220+ var jsonResponse = $ . parseJSON ( data ) ;
221+ if ( ! jsonResponse ) {
222+ $ ( 'div.MainDialog' ) . dialog ( 'close' ) ;
223+ midas . createNotice ( 'An error occurred, check the error logs' , 4000 ) ;
223224 return ;
224225 }
225226 if ( jsonResponse [ 0 ] ) {
You can’t perform that action at this time.
0 commit comments