minor fix
git-svn-id: http://svn.d4science-ii.research-infrastructures.eu/gcube/trunk/portlets/user/gcube-ckan-datacatalog@129847 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
37087d2d4f
commit
4c1734bd50
|
@ -311,7 +311,7 @@ public class GcubeCkanDataCatalogServiceImpl extends RemoteServiceServlet implem
|
|||
// In this way the publish widget can simply retrieve those information from the ASL session
|
||||
if(!toReturn.equals(CkanRole.MEMBER)){
|
||||
UserUtil.getLicenses(httpSession, username, concatenateSessionKeyScope(CKAN_LICENSES_KEY, currentScope), ckanUtils);
|
||||
UserUtil.getUserOrganizationsList(httpSession, username, concatenateSessionKeyScope(CKAN_ORGANIZATIONS_PUBLISH_KEY, currentScope), ckanUtils, getUserCKanTokenFromSession());
|
||||
UserUtil.getUserOrganizationsList(httpSession, username, isSysAdmin, concatenateSessionKeyScope(CKAN_ORGANIZATIONS_PUBLISH_KEY, currentScope), ckanUtils, getUserCKanTokenFromSession());
|
||||
UserUtil.getMetadataProfilesList(httpSession, username, concatenateSessionKeyScope(CKAN_PROFILES_KEY, currentScope), ckanUtils);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -309,14 +309,14 @@ public class UserUtil {
|
|||
* @param ckanOrganizationsPublishKey
|
||||
* @param ckanUtils
|
||||
*/
|
||||
public static void getUserOrganizationsList(HttpSession session, String username,
|
||||
public static void getUserOrganizationsList(HttpSession session, String username, boolean isSysAdmin,
|
||||
String ckanOrganizationsPublishKey, CKanUtils ckanUtils, String token) {
|
||||
|
||||
try{
|
||||
logger.debug("Request for user " + username + " organizations list");
|
||||
List<String> orgsName = new ArrayList<String>();
|
||||
|
||||
if(ckanUtils.isSysAdmin(username, token)){
|
||||
if(isSysAdmin){
|
||||
|
||||
logger.info("The user " + username + " is a sysadmin. He can publish everywhere");
|
||||
orgsName = ckanUtils.getOrganizationsNames(); // get all organizations' names
|
||||
|
|
Loading…
Reference in New Issue