How To Create a Server Action Display Condition for Super Admins Only

Overview

This article will provide an example of a display condition plugin that will only provide visibility to Super Admins in the list of Server Actions on a server.

Considerations

This will need to be added on a Server Action in Admin → Orchestration → Server Actions → The selected server action, then select the pencil icon next to Display Condition Plug-in and use the example below to use as-is or to build on to.

Example

def should_display(server, request=None):
    profile = request.get_user_profile()

    if profile.is_super_admin:
        return True
    else:
        return False
Have more questions? Submit a request

0 Comments

Please sign in to leave a comment.