[ 
https://issues.apache.org/jira/browse/ROL-1983?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13869027#comment-13869027
 ] 

Greg Huber edited comment on ROL-1983 at 1/12/14 12:29 PM:
-----------------------------------------------------------

Also, we could use something like this in the servlet:

{code:java}

WeblogRequest weblogRequest = null;
        try {
            weblogRequest = new WeblogRequest(request);

            // Make sure we have the correct authority
            User user = weblogRequest.getUser();
            if (user == null || !user.hasGlobalPermission("admin")) {
                // user not found or not admin
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
return;
            }

        } catch (Exception e) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

{code}


was (Author: gregh99):
Also, we could use something like this in the servlet:

{code:java}

WeblogRequest weblogRequest = null;
        try {
            weblogRequest = new WeblogRequest(request);

            // Make sure we have the correct authority
            User user = weblogRequest.getUser();
            if (user == null || !user.hasGlobalPermission("admin")) {
                // user not found or not admin
                response.sendError(HttpServletResponse.SC_NOT_FOUND);
            }

        } catch (Exception e) {
            response.sendError(HttpServletResponse.SC_NOT_FOUND);
            return;
        }

{code}

> stop using servlet call for user administration
> -----------------------------------------------
>
>                 Key: ROL-1983
>                 URL: https://issues.apache.org/jira/browse/ROL-1983
>             Project: Apache Roller
>          Issue Type: Task
>          Components: User Management
>    Affects Versions: 5.1
>            Reporter: Glen Mazza
>
> For some reason the Roller user list is presently implemented via a servlet, 
> allowing the list of blog users and email addresses to be publicly accessible 
> for those accessing the URL.  Goal here is to shut off the servlet and use a 
> traditional Struts/JPA method of listing the users on the page, perhaps 
> similar to our blog entry listing screen.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

Reply via email to