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