mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: icon replacing user status for remote users, denoting that they are from outside the local instance, #12688
This commit is contained in:
@@ -105,7 +105,7 @@
|
||||
"nodebb-plugin-ntfy": "1.7.4",
|
||||
"nodebb-plugin-spam-be-gone": "2.2.2",
|
||||
"nodebb-rewards-essentials": "1.0.0",
|
||||
"nodebb-theme-harmony": "2.0.0-pre.30",
|
||||
"nodebb-theme-harmony": "2.0.0-pre.31",
|
||||
"nodebb-theme-lavender": "7.1.8",
|
||||
"nodebb-theme-peace": "2.2.6",
|
||||
"nodebb-theme-persona": "13.3.24",
|
||||
|
||||
@@ -132,6 +132,8 @@
|
||||
"invisible": "Invisible",
|
||||
"offline": "Offline",
|
||||
|
||||
"remote-user": "This user is from outside of this forum",
|
||||
|
||||
"email": "Email",
|
||||
"language": "Language",
|
||||
|
||||
|
||||
@@ -61,6 +61,9 @@ MessageObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -122,6 +125,9 @@ RoomUserList:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -58,6 +58,9 @@ FlagObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
@@ -122,6 +125,9 @@ FlagHistoryObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
@@ -175,6 +181,9 @@ FlagNotesObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
|
||||
@@ -40,6 +40,9 @@ PostObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -35,6 +35,9 @@ TopicObject:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -5,6 +5,9 @@ UserObject:
|
||||
type: number
|
||||
description: A user identifier
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -209,6 +212,9 @@ UserObjectFull:
|
||||
type: number
|
||||
description: A user identifier
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -540,6 +546,9 @@ UserObjectSlim:
|
||||
type: number
|
||||
description: A user identifier
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -628,6 +637,9 @@ UserObjectACP:
|
||||
type: number
|
||||
description: A user identifier
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -45,6 +45,9 @@ get:
|
||||
type: string
|
||||
setting:
|
||||
type: boolean
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
default:
|
||||
type: string
|
||||
required:
|
||||
|
||||
@@ -151,6 +151,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -220,6 +223,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
example: Dragon Fruit
|
||||
|
||||
@@ -178,6 +178,9 @@ get:
|
||||
`icon:text` for the user's
|
||||
auto-generated icon
|
||||
example: "#f44336"
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
index:
|
||||
type: number
|
||||
cid:
|
||||
@@ -242,6 +245,9 @@ get:
|
||||
'icon:bgColor':
|
||||
type: string
|
||||
example: '#9c27b0'
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
imageClass:
|
||||
type: string
|
||||
- $ref: ../components/schemas/Pagination.yaml#/Pagination
|
||||
|
||||
@@ -49,6 +49,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
icon:text:
|
||||
type: string
|
||||
description: A single-letter representation of a username. This is used in the
|
||||
|
||||
@@ -90,6 +90,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -428,6 +431,9 @@ get:
|
||||
type: string
|
||||
displayname:
|
||||
type: string
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
- type: object
|
||||
description: Optional properties that may or may not be present (except for `tid`, which is always present, and is only here as a hack to pass validation)
|
||||
properties:
|
||||
|
||||
@@ -66,6 +66,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -90,6 +90,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -141,6 +144,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -213,6 +219,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -268,6 +277,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -306,6 +318,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -366,6 +381,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -419,6 +437,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
@@ -457,6 +478,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -35,6 +35,9 @@ get:
|
||||
uid:
|
||||
type: number
|
||||
description: A user identifier
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -64,6 +64,9 @@ put:
|
||||
type: number
|
||||
description: A user identifier
|
||||
example: 1
|
||||
isLocal:
|
||||
type: boolean
|
||||
description: Whether the user belongs to the local installation or not.
|
||||
username:
|
||||
type: string
|
||||
description: A friendly name for a given user account
|
||||
|
||||
@@ -285,6 +285,8 @@ module.exports = function (User) {
|
||||
user.banned = false;
|
||||
}
|
||||
}
|
||||
|
||||
user.isLocal = utils.isNumber(user.uid);
|
||||
});
|
||||
if (unbanUids.length) {
|
||||
await User.bans.unban(unbanUids, '[[user:info.ban-expired]]');
|
||||
|
||||
Reference in New Issue
Block a user