This repository was archived by the owner on Sep 10, 2021. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -324,9 +324,9 @@ public function removeitemAction()
324
324
{
325
325
throw new Zend_Exception ("The item doesn't exist. " );
326
326
}
327
- elseif (!$ this ->Folder ->policyCheck ($ folder , $ this ->userSession ->Dao , MIDAS_POLICY_ADMIN ))
327
+ elseif (!$ this ->Folder ->policyCheck ($ folder , $ this ->userSession ->Dao , MIDAS_POLICY_WRITE ))
328
328
{
329
- throw new Zend_Exception ('Admin permission on folder required ' );
329
+ throw new Zend_Exception ('Write permission on folder required ' );
330
330
}
331
331
elseif (!$ this ->Item ->policyCheck ($ item , $ this ->userSession ->Dao , MIDAS_POLICY_ADMIN ))
332
332
{
Original file line number Diff line number Diff line change @@ -217,9 +217,10 @@ midas.removeItem = function (id) {
217
217
$ . post ( json . global . webroot + '/folder/removeitem' ,
218
218
{ folderId : folderId , itemId : id } ,
219
219
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 ) ;
223
224
return ;
224
225
}
225
226
if ( jsonResponse [ 0 ] ) {
You can’t perform that action at this time.
0 commit comments