Initial impl of Authenticator and jsp files
This commit is contained in:
parent
41b7baa382
commit
58d4ab2f75
153 changed files with 7557 additions and 11415 deletions
3
src/zall/action/media/RemoveFolderAction.java
Normal file → Executable file
3
src/zall/action/media/RemoveFolderAction.java
Normal file → Executable file
|
|
@ -11,6 +11,7 @@ import javax.servlet.http.HttpSession;
|
|||
import zall.action.ZalleryAction;
|
||||
import zall.bean.Folder;
|
||||
import zall.bean.User;
|
||||
import zall.manager.AuthenticationManager;
|
||||
import zall.util.msg.UserMessage;
|
||||
import zall.util.msg.UserMessage.MessageType;
|
||||
import zutil.db.DBConnection;
|
||||
|
|
@ -38,7 +39,7 @@ public class RemoveFolderAction extends ZalleryAction{
|
|||
if( !folder.isEmpty(db) ){
|
||||
if(out != null) out.println("{ \"error\": \"Folder is not empty!\"}");
|
||||
else msgs.add(MessageType.ERROR, "Folder is not empty!");
|
||||
} else if( user.canEdit(folder) ){
|
||||
} else if( AuthenticationManager.canEdit(user, folder) ){
|
||||
folder.delete( db );
|
||||
if(out != null) out.println("{}");
|
||||
else msgs.add(MessageType.INFO, "Folder removed successfully.");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue