Project

General

Profile

« Previous | Next » 

Revision 2576

Added by sgarg over 18 years ago

Modified MetaCatUtil to read metacat access control lists from metacat.properties. Also coded various methods which can be used to find out if a user is an admin, moderator or on allowed/denied submitter list.

Modified MetaCatServlet to check if a user is allowed to insert/update before insert and update is done.

View differences:

MetaCatServlet.java
1623 1623
            out.println("<error>");
1624 1624
            out.println("Docid not specified");
1625 1625
            out.println("</error>");
1626
            MetaCatUtil.debugMessage("Docid not specified",10);
1626 1627
            return;
1627 1628
        }
1629
        
1630
        if(!MetaCatUtil.canInsertOrUpdate(user, groups)){
1631
        	out.println("<?xml version=\"1.0\"?>");
1632
            out.println("<error>");
1633
            out.println("User '" + user + "' not allowed to insert and update");
1634
            out.println("</error>");
1635
            MetaCatUtil.debugMessage("User '" + user + "' not allowed to insert and update",10);
1636
            return;
1637
        }
1628 1638

  
1629 1639
        try {
1630 1640
            // Get the document indicated

Also available in: Unified diff