Edgewall Software

Opened 6 years ago

Last modified 4 years ago

#13056 closed enhancement

Allow macros to be hidden from documentation — at Version 2

Reported by: Ryan J Ollos Owned by: Ryan J Ollos
Priority: normal Milestone: 1.3.6
Component: wiki system Version:
Severity: normal Keywords: macro
Cc: Branch:
Release Notes:
API Changes:
Internal Changes:

Description (last modified by Ryan J Ollos)

For "internal use only" macros like WikiMacros#LatestRelease-macro, it would be good to hide from the wiki macro help. We could either hide the macros with no documentation, or have a class attribute that indicates the macro should be hidden.

Another possible application is to hide documentation for that require a permission that the user does not possess.

Change History (2)

comment:1 by Ryan J Ollos, 6 years ago

Description: modified (diff)

comment:2 by Ryan J Ollos, 6 years ago

Description: modified (diff)
Milestone: next-major-releases1.3.4
Owner: set to Ryan J Ollos
Status: newassigned

The proposed changes (log:rjollos.git:t13056_hidden_macros)

  • Are backward-compatible
  • Allow hiding a macro help using _description = None

If that change looks okay I'll add tests.

To hide macro documentation based on user permissions we'd need to pass formatter to get_macro_description, so that formatter.req could be used. To be consistent with arguments of other methods we'd have to change:

- def get_macro_description(self, name):
+ def get_macro_description(self, formatter, name):

I don't have a particular use for that change now, so I'll skip it.

Note: See TracTickets for help on using tickets.