Uploaded image for project: 'Workspaces'
  1. Workspaces
  2. WORKSPACES-1312

Tag creation right is checked on the wrong context

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 2.8.0
    • None
    • Module Tasks
    • None
    • 4.6 M3

      @Callable
          public Map<String, Object> getProjectTags()
          {
              List<Map<String, Object>> tags = new ArrayList<>();
              
              for (String id : _tagProviderExtPt.getExtensionsIds())
              {
                  TagProvider<? extends Tag> tagProvider = _tagProviderExtPt.getExtension(id);
                  Map<String, ? extends Tag> someTags = tagProvider.getTags(Collections.emptyMap());
      
                  tags.addAll(_tagsToJSON(someTags.values()));
              }
              
              Map<String, Object> result = new HashMap<>();
              result.put("tags", tags);
              result.put("canCreate", _rightManager.currentUserHasRight(ProjectConstants.RIGHT_PROJECT_HANDLE_TAGS, "/cms") == RightResult.RIGHT_ALLOW);
              return result;
          }
      

      only manager can have rights on /cms

            lbouchet Loïc Bouchet
            raphael Raphaël Franchet
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: