Fixed initialization for any user role
This commit is contained in:
parent
2bcd6db875
commit
e350a4b9d8
|
@ -232,6 +232,12 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(GNADataEntryExtConfigProfile gNADataEntryConfig) {
|
public void onSuccess(GNADataEntryExtConfigProfile gNADataEntryConfig) {
|
||||||
GWT.log(GNADataEntryExtConfigProfile.class.getSimpleName() + " loaded: " + gNADataEntryConfig);
|
GWT.log(GNADataEntryExtConfigProfile.class.getSimpleName() + " loaded: " + gNADataEntryConfig);
|
||||||
|
|
||||||
|
try {
|
||||||
|
RootPanel.get(DIV_PORTLET_ID).remove(loaderApplication);
|
||||||
|
} catch (Exception e) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// PERMISSIONS
|
// PERMISSIONS
|
||||||
myRights = gNADataEntryConfig.getUserRights();
|
myRights = gNADataEntryConfig.getUserRights();
|
||||||
|
@ -255,16 +261,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
mainTabPanel.removeTab(0);
|
mainTabPanel.removeTab(0);
|
||||||
// activating Tab "List of Project"
|
// activating Tab "List of Project"
|
||||||
mainTabPanel.setTabActive(0);
|
mainTabPanel.setTabActive(0);
|
||||||
mainTabPanel.instanceAndShowListOfProjects();
|
//mainTabPanel.instanceAndShowListOfProjects();
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
|
||||||
RootPanel.get(DIV_PORTLET_ID).remove(loaderApplication);
|
|
||||||
} catch (Exception e) {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -318,6 +316,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
}
|
}
|
||||||
|
|
||||||
initDataEntryAppForListUseCaseDescriptors(result);
|
initDataEntryAppForListUseCaseDescriptors(result);
|
||||||
|
//After loading of UCD I can instance the "List of Project" view
|
||||||
|
mainTabPanel.instanceAndShowListOfProjects();
|
||||||
try {
|
try {
|
||||||
RootPanel.get(DIV_PORTLET_ID).remove(loaderConfigurations);
|
RootPanel.get(DIV_PORTLET_ID).remove(loaderConfigurations);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
@ -709,12 +709,9 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
confirm.hide();
|
confirm.hide();
|
||||||
|
|
||||||
// TODO QUA
|
|
||||||
|
|
||||||
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
||||||
newProjectEvent.getListGcubeProfiles());
|
newProjectEvent.getListGcubeProfiles());
|
||||||
// buildNewCards(orderedCards, OPERATION.NEW);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
@ -723,11 +720,8 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
|
|
||||||
} else if (projectSavedWithSuccess) {
|
} else if (projectSavedWithSuccess) {
|
||||||
// means the project has been saved
|
// means the project has been saved
|
||||||
|
|
||||||
// TODO HERE
|
|
||||||
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
||||||
newProjectEvent.getListGcubeProfiles());
|
newProjectEvent.getListGcubeProfiles());
|
||||||
// buildNewCards(orderedCards, OPERATION.NEW);
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
ModalConfirm confirm = new ModalConfirm(null, "Creating New Project...",
|
ModalConfirm confirm = new ModalConfirm(null, "Creating New Project...",
|
||||||
|
@ -738,11 +732,7 @@ public class GeoPortalDataEntryApp implements EntryPoint {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
confirm.hide();
|
confirm.hide();
|
||||||
|
|
||||||
// TODO HERE
|
|
||||||
// List<GeoNaFormCardModel> cardsPerIT =
|
|
||||||
// mapGcubeProfilePerItemType.get(newProjectEvent.getHandler().getItemType());
|
|
||||||
|
|
||||||
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
createNewDataEntyFor(newProjectEvent.getProfileID(), newProjectEvent.getHandler(),
|
||||||
newProjectEvent.getListGcubeProfiles());
|
newProjectEvent.getListGcubeProfiles());
|
||||||
|
|
||||||
|
|
|
@ -328,7 +328,7 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(ClickEvent event) {
|
public void onClick(ClickEvent event) {
|
||||||
|
|
||||||
instanceAndShowListOfProjects();
|
//instanceAndShowListOfProjects(false);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -596,9 +596,9 @@ public class GeonaMainTabPanel extends Composite {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public void instanceAndShowListOfProjects() {
|
public void instanceAndShowListOfProjects() {
|
||||||
|
GWT.log("instanceAndShowListOfProjects called");
|
||||||
// If only one UCD is available for DATA_LIST_GUI.. FIRE THE EVENT OF SELECTION
|
// If the list of UCDProjectType for listing is not empty.. FIRE THE EVENT OF SELECTION on the first item
|
||||||
if (ucdProjectTypesForListingDataView.size() == 1) {
|
if (ucdProjectTypesForListingDataView.size() > 0) {
|
||||||
UseCaseDescriptorDV singleUCD = ucdProjectTypesForListingDataView.get(0);
|
UseCaseDescriptorDV singleUCD = ucdProjectTypesForListingDataView.get(0);
|
||||||
alertProjectType.setText(singleUCD.getName());
|
alertProjectType.setText(singleUCD.getName());
|
||||||
// setFilteringParameters(displayFields, sortByFields, searchForFields,
|
// setFilteringParameters(displayFields, sortByFields, searchForFields,
|
||||||
|
|
|
@ -746,7 +746,7 @@ public class GeoportalDataEntryServiceImpl extends RemoteServiceServlet implemen
|
||||||
// DEV MODE
|
// DEV MODE
|
||||||
if (!SessionUtil.isIntoPortal()) {
|
if (!SessionUtil.isIntoPortal()) {
|
||||||
LOG.warn("OUT OF PORTAL - DEV MODE detected");
|
LOG.warn("OUT OF PORTAL - DEV MODE detected");
|
||||||
GcubeUserRole myRole = GcubeUserRole.DATA_MANAGER;
|
GcubeUserRole myRole = GcubeUserRole.DATA_MEMBER;
|
||||||
|
|
||||||
for (RoleRights roleRight : listUserRightsForRole) {
|
for (RoleRights roleRight : listUserRightsForRole) {
|
||||||
if (roleRight.getUserRole().equals(myRole)) {
|
if (roleRight.getUserRole().equals(myRole)) {
|
||||||
|
|
Loading…
Reference in New Issue