Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve human readability of account config files #150

Merged
merged 1 commit into from
Jul 28, 2024

Conversation

jhalter
Copy link
Owner

@jhalter jhalter commented Jul 28, 2024

The account config files in config/Users were not originally intended to be viewed and edited by humans, but in practice it's useful to see and edit permissions outside of a Hotline client.

This change overrides the YAML marshal/unmarshaling to write the account permission bitmap as a human readable map of boolean flags instead of the previously inscrutable array of ints.

Existing user configs in the old format can still be read and will update to the new format on first save.

I also realized the Folder Upload/Download access bits missing and fixed them.

Before

Access: [96, 112, 12, 32, 3, 128, 0, 0]

After

Access:
    DownloadFile: true
    DownloadFolder: true
    UploadFile: true
    UploadFolder: false
    DeleteFile: false
    ...

@jhalter jhalter merged commit 72f8a1f into master Jul 28, 2024
1 check passed
@jhalter jhalter deleted the account_file_flags branch July 28, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant