Only allow administrator to view version
Some checks failed
continuous-integration/drone/tag Build is failing
Some checks failed
continuous-integration/drone/tag Build is failing
This commit is contained in:
parent
3cd0b50b3c
commit
b2fb92dcbc
5 changed files with 34 additions and 6 deletions
|
@ -4,6 +4,12 @@ type: docker
|
|||
name: build
|
||||
|
||||
steps:
|
||||
- name: "Replace version"
|
||||
image: "debian"
|
||||
commands:
|
||||
- sed -i s/<INSERT_TAG_DURING_BUILD>/${DRONE_TAG}/g lib/mastodon/version.rb
|
||||
|
||||
|
||||
- name: "Build Image"
|
||||
image: "plugins/docker:20.14.4"
|
||||
environment:
|
||||
|
|
20
README.md
20
README.md
|
@ -2,13 +2,29 @@
|
|||
|
||||
Dieses Repository enthält den Quellcode für [paravielfalt.zone](https://paravielfalt.zone).
|
||||
|
||||
Die Instanz basiert auf der populären Software Mastodon, deren Quellcode hier gefunden werden kann: <https://github.com/mastodon/mastodon>.
|
||||
Die Instanz basiert auf Mastodon und ist vom offiziellen Quellcode-Repository geforkt: <https://github.com/mastodon/mastodon>.
|
||||
|
||||
|
||||
## Änderungsübersicht
|
||||
|
||||
Gegenüber der Standardinstallation gibt es folgende Änderungen.
|
||||
Gegenüber der Mastodon-Standardinstallation gibt es folgende Änderungen.
|
||||
|
||||
- Zeichenlimit von 500 auf 700 Zeichen erhöht
|
||||
- IP-Adressen anonymisiert
|
||||
- Nur Administratoren dürfen die Versionsnummer sehen
|
||||
|
||||
|
||||
[Vollständige Liste aller Änderungen](https://git.rabbithole.cyou/paravielfalt/mastodon/compare/stable-4.1...paravielfalt-4.1).
|
||||
|
||||
|
||||
## Neue Version bauen
|
||||
|
||||
```sh
|
||||
git tag v4.1.4-pvz$(date '+%y%m%d%H%M')
|
||||
```
|
||||
|
||||
```sh
|
||||
git push --tag
|
||||
```
|
||||
|
||||
Build in Drone aktzeptieren.
|
||||
|
|
|
@ -6,7 +6,7 @@ import { Link } from 'react-router-dom';
|
|||
import { domain, version, source_url, statusPageUrl, profile_directory as profileDirectory } from 'mastodon/initial_state';
|
||||
import { logOut } from 'mastodon/utils/log_out';
|
||||
import { openModal } from 'mastodon/actions/modal';
|
||||
import { PERMISSION_INVITE_USERS } from 'mastodon/permissions';
|
||||
import { PERMISSION_INVITE_USERS, PERMISSION_ADMINISTRATOR } from 'mastodon/permissions';
|
||||
|
||||
const messages = defineMessages({
|
||||
logoutMessage: { id: 'confirmations.logout.message', defaultMessage: 'Are you sure you want to log out?' },
|
||||
|
@ -50,6 +50,7 @@ class LinkFooter extends React.PureComponent {
|
|||
const { signedIn, permissions } = this.context.identity;
|
||||
|
||||
const canInvite = signedIn && ((permissions & PERMISSION_INVITE_USERS) === PERMISSION_INVITE_USERS);
|
||||
const canViewVersion = signedIn && ((permissions & PERMISSION_ADMINISTRATOR) === PERMISSION_INVITE_USERS);
|
||||
const canProfileDirectory = profileDirectory;
|
||||
|
||||
const DividingCircle = <span aria-hidden>{' · '}</span>;
|
||||
|
@ -92,8 +93,12 @@ class LinkFooter extends React.PureComponent {
|
|||
<Link to='/keyboard-shortcuts'><FormattedMessage id='footer.keyboard_shortcuts' defaultMessage='Keyboard shortcuts' /></Link>
|
||||
{DividingCircle}
|
||||
<a href={source_url} rel='noopener noreferrer' target='_blank'><FormattedMessage id='footer.source_code' defaultMessage='View source code' /></a>
|
||||
{canViewVersion && (
|
||||
<>
|
||||
{DividingCircle}
|
||||
v{version}
|
||||
</>
|
||||
)}
|
||||
</p>
|
||||
</div>
|
||||
);
|
||||
|
|
|
@ -2,3 +2,4 @@ export const PERMISSION_INVITE_USERS = 0x0000000000010000;
|
|||
export const PERMISSION_MANAGE_USERS = 0x0000000000000400;
|
||||
export const PERMISSION_MANAGE_FEDERATION = 0x0000000000000020;
|
||||
export const PERMISSION_MANAGE_REPORTS = 0x0000000000000010;
|
||||
export const PERMISSION_ADMINISTRATOR = 0x0000000000000001;
|
||||
|
|
|
@ -21,7 +21,7 @@ module Mastodon
|
|||
end
|
||||
|
||||
def suffix
|
||||
''
|
||||
'<INSERT_TAG_DURING_BUILD>'
|
||||
end
|
||||
|
||||
def to_a
|
||||
|
|
Loading…
Reference in a new issue