Closed josegar74 closed 9 years ago
This happens for Administrator users as the service returns all groups for these users.
Is this a bug or a feature? I wonder....
For me is a bug. Users should not create metadata in special groups, at least never has been like this.
The "easy" fix is to remove the groups combo directive to avoid rendering the special groups adding this to groupsCombo.hml
, see in the following snippet data-ng-if
:
<option data-ng-repeat="g in groups | orderBy:'name'" value="{{g['@id']}}" data-ng-if="g['@id'] > 1"
This directive is used in these places:
In the 3 first cases makes sense to me to remove the special groups, but not sure in the last case? Any feedback on this would be appreciated
I would suggest to add to the directive an attribute which configure if system groups needs to be in the listed or not (see https://github.com/geonetwork/core-geonetwork/blob/develop/web-ui/src/main/resources/catalog/components/search/formfields/FormFieldsDirective.js#L215) and by default not include them ? The info service will take care of returning the groups you want (sounds better than the filter by id).
Also, at the same time, remove "@json" by _content_type=json.
I have implemented is a similar way, but just see your comment now.
The special groups are not displayed, except for the directives that seem in 2.10 displays the special groups also.
There's already an attribute already to retrieve system groups, but in the case of an administrator user are retrieved in any case.
I guess with the solution applied, can manage both cases better.
Internal groups (All, Guest, Intranet) should not be displayed for the metadata group owner selection in the metadata create form.