Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Attempt to improve textual power levels #1607

Merged
merged 4 commits into from
Nov 14, 2017

Conversation

lukebarnard1
Copy link
Contributor

@lukebarnard1 lukebarnard1 commented Nov 13, 2017

This modifies displayed power levels such that:

  • If users_default is !== 0:
    • the power level 0 is displayed as "Restricted (0)"
    • the power level users_default is displayed as "Default ({users_default})"
  • Otherwise:
    • the power level 0 is displayed as "Default (0)"

When changing users_default, to say, 10, when the textual powers are rendered
again, they will take users_default into account. So those previously at 10
and which would have previously have been rendered "Custom of 10" will now
read "Default (10)". Conversely, those that were "Default (0)" will now read
"Restricted (0)".

Built atop #1606
Fixes element-hq/element-web#5107

This now also fixes a bug that prevented changes to power levels introduced by #1606 (and the fix was probably done in 3fa1bec).

This modifies displayed power levels such that:
 - If users_default is !== 0:
   - the power level 0 is displayed as "Restricted (0)"
   - the power level users_default is displayed as "Default ({users_default})"
 - Otherwise:
   - the power level 0 is displayed as "Default (0)"

When changing users_default, to say, 10, when the textual powers are rendered
again, they will take users_default into account. So those previously at 10
and which would have previously have been rendered "Custom of 10" will now
read "Default (10)". Conversely, those that were "Default (0)" will now read
"Restricted (0)".
Also fix not-i18n-friendly "of" to be "=".
@dbkr dbkr assigned lukebarnard1 and unassigned dbkr Nov 14, 2017
@lukebarnard1 lukebarnard1 merged commit c644e7d into develop Nov 14, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

cannot un-Admin yourself through RightPanel mod tools
2 participants