Index: lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgManageAction.java =================================================================== RCS file: /usr/local/cvsroot/lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgManageAction.java,v diff -u -r1.12 -r1.13 --- lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgManageAction.java 14 Aug 2006 05:38:55 -0000 1.12 +++ lams_admin/src/java/org/lamsfoundation/lams/admin/web/OrgManageAction.java 5 Sep 2006 02:54:35 -0000 1.13 @@ -110,19 +110,26 @@ List orgManageBeans = new ArrayList(); //if(getService().isUserSysAdmin(username)){ Integer userId = ((UserDTO)SessionManager.getSession().getAttribute(AttributeNames.USER)).getUserID(); - if(request.isUserInRole(Role.SYSADMIN) || getService().isUserInRole(userId, orgId, Role.COURSE_ADMIN) || getService().isUserInRole(userId, orgId, Role.COURSE_MANAGER)){ + if(request.isUserInRole(Role.SYSADMIN) || request.isUserInRole(Role.COURSE_ADMIN) || request.isUserInRole(Role.COURSE_MANAGER)){ Integer type; if(orgManageForm.getType().equals(OrganisationType.ROOT_TYPE)){ type = OrganisationType.COURSE_TYPE; }else{ type = OrganisationType.CLASS_TYPE; } List organisations = getService().findByProperty(Organisation.class,"organisationType.organisationTypeId",type); - log.debug("user is sysadmin"); - log.debug("Got "+organisations.size()+" organsiations"); + log.debug("user is an admin or manager"); + log.debug("Got "+organisations.size()+" organisations"); log.debug("organisationType is "+type); for(int i=0; i headerLinks = new ArrayList(); //headerLinks.add(new IndexLinkBean("index.dummymonitor","javascript:openDummyMonitor()")); headerLinks.add(new IndexLinkBean("index.myprofile", "javascript:openProfile('" + request.getRemoteUser()+"')")); - if (request.isUserInRole(Role.SYSADMIN)) { - log.debug("user is sysadmin"); + if (request.isUserInRole(Role.SYSADMIN) || request.isUserInRole(Role.COURSE_ADMIN) || request.isUserInRole(Role.COURSE_MANAGER)) { + log.debug("user is an admin or manager"); headerLinks.add(new IndexLinkBean("index.sysadmin", "javascript:openSysadmin()")); headerLinks.add(new IndexLinkBean("index.courseman", "javascript:openOrgManagement(" + getService().getRootOrganisation().getOrganisationId()+")")); }