diff --git a/CHANGELOG.md b/CHANGELOG.md
index 5451a00e..bb1790cc 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -20,7 +20,6 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Hide Tag actions on Users tab if MRF TagPolicy is disabled. Add ability to enable TagPolicy from Moderation menu
- Move `:restrict_unauthenticated` settings from Authentication tab to Instance tab
- Replace regular inputs with textareas for setting welcome messages in the Settings section
-- Move tag moderation from Moderation menu to separate column in the Users table, add ability to add custom tags
### Fixed
diff --git a/src/api/__mocks__/users.js b/src/api/__mocks__/users.js
index 8e637ebe..a389d7f4 100644
--- a/src/api/__mocks__/users.js
+++ b/src/api/__mocks__/users.js
@@ -121,10 +121,6 @@ export async function deleteUsers(nicknames, authHost, token) {
})
}
-export async function listAllTags(authHost, token) {
- return Promise.resolve({ data: ['verify', 'mrf_tag:media-force-nsfw'] })
-}
-
export async function tagUser(nickname, tag, authHost, token) {
return Promise.resolve()
}
diff --git a/src/api/users.js b/src/api/users.js
index d45aa701..41c6b9b4 100644
--- a/src/api/users.js
+++ b/src/api/users.js
@@ -22,35 +22,6 @@ export async function addRight(nicknames, right, authHost, token) {
})
}
-export async function fetchUserChats(id, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/${id}/chats`,
- method: 'get',
- headers: authHeaders(token)
- })
-}
-
-export async function approveUserAccount(nicknames, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: '/api/pleroma/admin/users/approve',
- method: 'patch',
- headers: authHeaders(token),
- data: { nicknames }
- })
-}
-
-export async function confirmUserEmail(nicknames, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: '/api/pleroma/admin/users/confirm_email',
- method: 'patch',
- headers: authHeaders(token),
- data: { nicknames }
- })
-}
-
export async function createNewAccount(nickname, email, password, authHost, token) {
return await request({
baseURL: baseName(authHost),
@@ -110,6 +81,25 @@ export async function fetchUser(id, authHost, token) {
})
}
+export async function fetchUserCredentials(nickname, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: `/api/pleroma/admin/users/${nickname}/credentials`,
+ method: 'get',
+ headers: authHeaders(token)
+ })
+}
+
+export async function updateUserCredentials(nickname, credentials, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: `/api/pleroma/admin/users/${nickname}/credentials`,
+ method: 'patch',
+ headers: authHeaders(token),
+ data: credentials
+ })
+}
+
export async function fetchUsers(filters, actorTypeFilters, authHost, token, page = 1) {
const url = actorTypeFilters.length === 0
? `/api/pleroma/admin/users?page=${page}&filters=${filters}`
@@ -126,34 +116,6 @@ export async function fetchUsers(filters, actorTypeFilters, authHost, token, pag
})
}
-export async function fetchUserCredentials(nickname, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/${nickname}/credentials`,
- method: 'get',
- headers: authHeaders(token)
- })
-}
-
-export async function fetchUserStatuses(id, authHost, godmode, token) {
- return await request({
- baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/${id}/statuses?godmode=${godmode}`,
- method: 'get',
- headers: authHeaders(token)
- })
-}
-
-export async function forcePasswordReset(nicknames, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/force_password_reset`,
- method: 'patch',
- headers: authHeaders(token),
- data: { nicknames }
- })
-}
-
export async function getPasswordResetToken(nickname, authHost, token) {
return await request({
baseURL: baseName(authHost),
@@ -163,19 +125,10 @@ export async function getPasswordResetToken(nickname, authHost, token) {
})
}
-export async function listAllTags(authHost, token) {
+export async function forcePasswordReset(nicknames, authHost, token) {
return await request({
baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/tag`,
- method: 'get',
- headers: authHeaders(token)
- })
-}
-
-export async function resendConfirmationEmail(nicknames, authHost, token) {
- return await request({
- baseURL: baseName(authHost),
- url: '/api/pleroma/admin/users/resend_confirmation_email',
+ url: `/api/pleroma/admin/users/force_password_reset`,
method: 'patch',
headers: authHeaders(token),
data: { nicknames }
@@ -218,13 +171,51 @@ export async function untagUser(nicknames, tags, authHost, token) {
})
}
-export async function updateUserCredentials(nickname, credentials, authHost, token) {
+export async function fetchUserStatuses(id, authHost, godmode, token) {
return await request({
baseURL: baseName(authHost),
- url: `/api/pleroma/admin/users/${nickname}/credentials`,
+ url: `/api/pleroma/admin/users/${id}/statuses?godmode=${godmode}`,
+ method: 'get',
+ headers: authHeaders(token)
+ })
+}
+
+export async function fetchUserChats(id, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: `/api/pleroma/admin/users/${id}/chats`,
+ method: 'get',
+ headers: authHeaders(token)
+ })
+}
+
+export async function approveUserAccount(nicknames, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: '/api/pleroma/admin/users/approve',
method: 'patch',
headers: authHeaders(token),
- data: credentials
+ data: { nicknames }
+ })
+}
+
+export async function confirmUserEmail(nicknames, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: '/api/pleroma/admin/users/confirm_email',
+ method: 'patch',
+ headers: authHeaders(token),
+ data: { nicknames }
+ })
+}
+
+export async function resendConfirmationEmail(nicknames, authHost, token) {
+ return await request({
+ baseURL: baseName(authHost),
+ url: '/api/pleroma/admin/users/resend_confirmation_email',
+ method: 'patch',
+ headers: authHeaders(token),
+ data: { nicknames }
})
}
diff --git a/src/lang/en.js b/src/lang/en.js
index 7bc59811..e21a156d 100644
--- a/src/lang/en.js
+++ b/src/lang/en.js
@@ -192,7 +192,6 @@ export default {
search: 'Search',
id: 'ID',
name: 'Name',
- label: 'Label',
status: 'Status',
local: 'Local',
external: 'External',
@@ -280,12 +279,9 @@ export default {
registrationReason: 'Registration Reason',
service: 'Service',
person: 'Person',
- enableTagPolicy: 'Enable MRF TagPolicy to manage tags',
+ enableTagPolicy: 'Enable MRF TagPolicy to manage user tags',
confirmEnablingTagPolicy: 'Are you sure you want to add TagPolicy to the list of enabled MRF policies?',
- enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled',
- customTags: 'Custom Tags',
- defaultTags: 'Default Tags',
- tags: 'Tags'
+ enableTagPolicySuccessMessage: 'MRF TagPolicy was enabled'
},
statuses: {
statuses: 'Statuses',
diff --git a/src/store/modules/users.js b/src/store/modules/users.js
index 7bacb907..29b98fcf 100644
--- a/src/store/modules/users.js
+++ b/src/store/modules/users.js
@@ -3,21 +3,20 @@ import i18n from '@/lang'
import {
activateUsers,
addRight,
- approveUserAccount,
- confirmUserEmail,
createNewAccount,
deactivateUsers,
deleteRight,
deleteUsers,
disableMfa,
fetchUsers,
- forcePasswordReset,
getPasswordResetToken,
- listAllTags,
- resendConfirmationEmail,
searchUsers,
tagUser,
untagUser,
+ forcePasswordReset,
+ approveUserAccount,
+ confirmUserEmail,
+ resendConfirmationEmail,
updateUserCredentials
} from '@/api/users'
import { fetchSettings, updateSettings } from '@/api/settings'
@@ -36,8 +35,7 @@ const users = {
passwordResetToken: {
token: '',
link: ''
- },
- tags: []
+ }
},
mutations: {
SET_ACTOR_TYPE_FILTERS: (state, actorTypeFilters) => {
@@ -83,9 +81,6 @@ const users = {
SET_TAG_POLICY: (state, mrfPolicies) => {
state.mrfPolicies = mrfPolicies
},
- SET_TAGS: (state, tags) => {
- state.tags = tags
- },
SET_USERS_FILTERS: (state, filters) => {
state.filters = filters
}
@@ -249,10 +244,6 @@ const users = {
RemovePasswordToken({ commit }) {
commit('SET_PASSWORD_RESET_TOKEN', { link: '', token: '' })
},
- async ListTags({ commit, getters }) {
- const { data } = await listAllTags(getters.authHost, getters.token)
- commit('SET_TAGS', data)
- },
async RemoveTag({ dispatch, getters }, { users, tag, _userId, _statusId }) {
const updatedUsers = users.map(user => {
return { ...user, tags: user.tags.filter(userTag => userTag !== tag) }
diff --git a/src/views/reports/components/ModerateUserDropdown.vue b/src/views/reports/components/ModerateUserDropdown.vue
index 922c5a56..3d5618f1 100644
--- a/src/views/reports/components/ModerateUserDropdown.vue
+++ b/src/views/reports/components/ModerateUserDropdown.vue
@@ -15,17 +15,49 @@
@click.native="handleDeletion(account)">
{{ $t('users.deleteAccount') }}
-