Skip to content

Change Discord Login Badge to only show if the Discord Auth plugin is loaded, #5

@Kiro47

Description

@Kiro47

Currently in users/private.html we show the Discord badge if the user has any oauth.id values set. This could be bad in the case of if MLC was also enabled. Instead, we should definitely use the Jinja template to only show it if the discord plugin is enabled and the oauth_id information is present.

For example how MLC handles it:

{% if integrations.mlc() and user.oauth_id %}
    <a href="https://majorleaguecyber.org/u/{{ user.name }}">
        <h3><span class="badge badge-primary">Official</span></h3>
     </a>
{% endif %}

The integrations variable doesn't really offer any support for plugins and the plugins variable itself is also empty for some reason. This may need a bit of research to figure out how exactly to do this.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesthelp wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions