APISonar


com.redhat.rhn.frontend.struts.RequestContext.ORG

> com > redhat > rhn > frontend > struts > RequestContext > ORG
com APIs redhat APIs rhn APIs frontend APIs struts APIs RequestContext APIs ORG APIs

Example 1
public ActionForward execute(ActionMapping mapping, ActionForm formIn,
            HttpServletRequest request, HttpServletResponse response)
    throws Exception {
        RequestContext ctx = new RequestContext(request);
        Org org = ctx.getCurrentUser().getOrg();
        if (!ctx.getCurrentUser().hasRole(RoleFactory.ORG_ADMIN)) {
            throw new PermissionException("Organization Administrator role is required.");
        }
        request.setAttribute(RequestContext.ORG, org);
        request.setAttribute("edit_disabled", !org.getOrgAdminMgmt().isEnabled());
        return process(mapping, request, ctx, org);
    }