7 wishes: 2 - Automatic use of Javascript-, Stylesheet- and Extension Points extensions based on user group

Javascript and Stylesheets and Extension Points define their “use scope”

"on this page or demand"
"on demand only"
"on this wiki"
"currnt user" (extension points)

I would like to suggest that usage be defined via new user groups.

Membership of such a “user group” could be defined by the user themselves or by the administrator. The administrator could define default settings.
(At the moment we only know the “advanced user”)

Constructions like this skeletal piece of javascript code:

var XWiki = (function (XWiki) {
  function someLocalFunctions(p,pp) { bla }
   ...
  var someVariables = "bla";
   ...
  ## some velocity
  #set($extraVariables=$xwiki.extraFunctions(bla)
   ...
  function init() {
      require(['jquery', 'bootstrap'], function ($, bootstrap) {
            ...
            $.ajax({
            type: 'GET',
            url: someUrl,
            cache: false,
          }).done( function(data) { .. } );
            ....
    });
  }
  (XWiki.domIsLoaded && init()) || document.observe('xwiki:dom:loaded', init);
  return XWiki;
}(XWiki || {}));

offer a variety of more complex applications.

(WYSIWYG) editors with different interfaces / tasks
Activation of different mouse-over effects (display preview, display author, display change data ...)
Variation of standard layouts
Of course, you could do this yourself in a script, but then these things would not be as transparent.

If I understand you’d like to have the ability to apply a JSX/SSX/UIX to a group of users.

Technically this is not currently possible as it would mean being able to register a component in a Component Manager instance for a group, which doesn’t exist, see https://extensions.xwiki.org/xwiki/bin/view/Extension/Component%20Module#HNamespaces

Now, anything is possible but not sure how performant it would be to define a component manager for each group in the wiki… That sounds a bit complex and unperformant or not very scalable.

Note that you can implement the same behavior by having some velocity script inside the JSX/SSX/UIX to decide what to do based on the group of the user.

Thanks for the idea.