Skip to content

Log tag changes #281

Closed
Closed

Description

@marko-radosavljevic

Is your feature request related to a problem? Please describe.

Managing tags (creating, editing, deleting) is done on the discord. It's not under version control, and we do not know who issued tag managing command.

And since a lot of people have permission to manage tags, it would be nice to be able to audit the changes, and revert in case tag gets accidentally deleted or similar.

Describe the solution you'd like

Every /tag-manage to be logged in #mod_audit_log, so we can know who edited the tag, when, and what are the changes being made.

Activity

  1. added
    good first issue
    enhance command
    on Nov 24, 2021
  2. interacsion commented on Dec 1, 2021

    @interacsion
    Contributor

    I'll start working on that

  3. Zabuzard commented on Dec 2, 2021

    @Zabuzard
    Member

    I'll start working on that

    Awesome, enjoy! If you have any questions, feel free to ask either here or in the Discord server 😃

  4. Zabuzard commented on Dec 2, 2021

    @Zabuzard
    Member

    Design-wise, I would maybe create a separate class that offers a method to write arbitrary messages into the log channel. And then let the tag manage command class take an instance of that class and use the method there, whenever the tags are changed.

    Not sure whether the existing mod routine class would be much of a help here honestly, it has a completely different purpose and flow. But I still feel like all mod-log actions should be near to it, at least in the same package. Hence why I would just create some ModAuditLogWriter class or similar there and give it a method log public void logMessage(String message) which others can then use.

  5. interacsion commented on Dec 2, 2021

    @interacsion
    Contributor

    Should the bot log the action instantly, or wait for the routine?

  6. interacsion commented on Dec 2, 2021

    @interacsion
    Contributor

    do we need to log it when someone uses /tag-manage raw?

  7. interacsion commented on Dec 2, 2021

    @interacsion
    Contributor

    also, does it need to show the content of the tag when using create etc' and/or the old content when using edit etc'?

  8. Zabuzard commented on Dec 3, 2021

    @Zabuzard
    Member

    Should the bot log the action instantly, or wait for the routine?

    Yeah, just dont connect this code to the routine at all. Imo they dont have anything to do with each other.

    do we need to log it when someone uses /tag-manage raw?

    No. Just the once that actually change something: create, edit, delete, ...

    also, does it need to show the content of the tag when using create etc' and/or the old content when using edit etc'?

    Yeah, this is actually crucial to be able to "revert" accidental changes. It has to log the state before and after the change. I would suggest to just attach them as "file" to the embed, like a before.md and after.md file or similar.

  9. linked a pull request that will close this issueLogging the /tag-manage command #296on Dec 3, 2021
  10. interacsion commented on Dec 3, 2021

    @interacsion
    Contributor

    I would suggest to just attach them as "file" to the embed, like a before.md and after.md file or similar.

    The thing is, when I attach the file to the embed it puts the file before the embed. I think that sending the files in different messages is the way to go.

  11. Zabuzard commented on Dec 3, 2021

    @Zabuzard
    Member

    The thing is, when I attach the file to the embed it puts the file before the embed. I think that sending the files in different messages is the way to go.

    If you say so - your feature, your design 👍 If you need feedback, show some screenshots 👌

  12. 13 remaining items

  13. marko-radosavljevic commented on Dec 4, 2021

    @marko-radosavljevic
    ContributorAuthor

    Yup, same with me, it's not something we would use extensively, doesn't need to have a perfect UX.

    Like Zabu said, above or below, doesn't matter. It's important that it is consistent, so we can always read it the same way, without getting confused and having to track down before and after. And it should be accurate, so we can depend on it. Everything else is just cosmetics. So yeah, I'm also voting for same message, no spoilers. ☺️

    Thanks ❤️

  14. interacsion commented on Dec 4, 2021

    @interacsion
    Contributor

    no problem, as you wish :)

  15. github-actions commented on Jan 4, 2022

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  16. added
    inactivity-closed
    on Jan 4, 2022
  17. removed
    inactivity-closed
    on Jan 10, 2022
  18. Zabuzard commented on Jan 10, 2022

    @Zabuzard
    Member

    Development on this is still ongoing and we want it (@MaiTheLord )

  19. github-actions commented on Feb 10, 2022

    @github-actions

    This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.

  20. added
    valid
    and removed on Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

enhance commandgood first issuepriority: majorvalid

Type

No type

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions