feat: assets move + comments migration + admin users UI
This commit is contained in:
11
server/db/migrations-sqlite/2.4.36.js
Normal file
11
server/db/migrations-sqlite/2.4.36.js
Normal file
@@ -0,0 +1,11 @@
|
||||
exports.up = knex => {
|
||||
return knex.schema
|
||||
.alterTable('comments', table => {
|
||||
table.text('render').notNullable().defaultTo('')
|
||||
table.string('name').notNullable().defaultTo('')
|
||||
table.string('email').notNullable().defaultTo('')
|
||||
table.string('ip').notNullable().defaultTo('')
|
||||
})
|
||||
}
|
||||
|
||||
exports.down = knex => { }
|
11
server/db/migrations/2.4.36.js
Normal file
11
server/db/migrations/2.4.36.js
Normal file
@@ -0,0 +1,11 @@
|
||||
exports.up = knex => {
|
||||
return knex.schema
|
||||
.alterTable('comments', table => {
|
||||
table.text('render').notNullable().defaultTo('')
|
||||
table.string('name').notNullable().defaultTo('')
|
||||
table.string('email').notNullable().defaultTo('')
|
||||
table.string('ip').notNullable().defaultTo('')
|
||||
})
|
||||
}
|
||||
|
||||
exports.down = knex => { }
|
@@ -13,7 +13,7 @@ module.exports = {
|
||||
UserQuery: {
|
||||
async list(obj, args, context, info) {
|
||||
return WIKI.models.users.query()
|
||||
.select('id', 'email', 'name', 'providerKey', 'isSystem', 'createdAt')
|
||||
.select('id', 'email', 'name', 'providerKey', 'isSystem', 'isActive', 'createdAt', 'lastLoginAt')
|
||||
},
|
||||
async search(obj, args, context, info) {
|
||||
return WIKI.models.users.query()
|
||||
|
@@ -117,7 +117,9 @@ type UserMinimal {
|
||||
email: String!
|
||||
providerKey: String!
|
||||
isSystem: Boolean!
|
||||
isActive: Boolean!
|
||||
createdAt: Date!
|
||||
lastLoginAt: Date
|
||||
}
|
||||
|
||||
type User {
|
||||
|
@@ -33,6 +33,7 @@ module.exports = {
|
||||
enum: value.enum || false,
|
||||
multiline: value.multiline || false,
|
||||
sensitive: value.sensitive || false,
|
||||
maxWidth: value.maxWidth || 0,
|
||||
order: value.order || 100
|
||||
})
|
||||
return result
|
||||
|
@@ -53,7 +53,7 @@ module.exports = async () => {
|
||||
// ----------------------------------------
|
||||
|
||||
app.use(favicon(path.join(WIKI.ROOTPATH, 'assets', 'favicon.ico')))
|
||||
app.use(express.static(path.join(WIKI.ROOTPATH, 'assets'), {
|
||||
app.use('/_assets', express.static(path.join(WIKI.ROOTPATH, 'assets'), {
|
||||
index: false,
|
||||
maxAge: '7d'
|
||||
}))
|
||||
|
@@ -19,11 +19,13 @@ props:
|
||||
type: String
|
||||
default: cn='root'
|
||||
hint: The dstinguished name (dn) of the account used for binding.
|
||||
maxWidth: 600
|
||||
order: 2
|
||||
bindCredentials:
|
||||
title: Admin Bind Credentials
|
||||
type: String
|
||||
hint: The password of the account used above for binding.
|
||||
maxWidth: 600
|
||||
order: 3
|
||||
searchBase:
|
||||
title: Search Base
|
||||
@@ -57,22 +59,26 @@ props:
|
||||
type: String
|
||||
default: 'uid'
|
||||
hint: The field storing the user unique identifier. Usually "uid" or "sAMAccountName".
|
||||
maxWidth: 500
|
||||
order: 20
|
||||
mappingEmail:
|
||||
title: Email Field Mapping
|
||||
type: String
|
||||
default: 'mail'
|
||||
hint: The field storing the user email. Usually "mail".
|
||||
maxWidth: 500
|
||||
order: 21
|
||||
mappingDisplayName:
|
||||
title: Display Name Field Mapping
|
||||
type: String
|
||||
default: 'displayName'
|
||||
hint: The field storing the user display name. Usually "displayName" or "cn".
|
||||
maxWidth: 500
|
||||
order: 22
|
||||
mappingPicture:
|
||||
title: Avatar Picture Field Mapping
|
||||
type: String
|
||||
default: 'jpegPhoto'
|
||||
hint: The field storing the user avatar picture. Usually "jpegPhoto" or "thumbnailPhoto".
|
||||
maxWidth: 500
|
||||
order: 23
|
||||
|
@@ -12,23 +12,26 @@ scopes:
|
||||
- email
|
||||
- openid
|
||||
props:
|
||||
clientId:
|
||||
title: Client ID
|
||||
type: String
|
||||
hint: 20 chars alphanumeric string
|
||||
order: 2
|
||||
clientSecret:
|
||||
title: Client Secret
|
||||
type: String
|
||||
hint: 40 chars alphanumeric string with a hyphen(s)
|
||||
order: 3
|
||||
idp:
|
||||
title: Identity Provider ID (idp)
|
||||
type: String
|
||||
hint: (Optional) - 20 chars alphanumeric string
|
||||
order: 4
|
||||
audience:
|
||||
title: Org URL
|
||||
type: String
|
||||
hint: Okta organization URL (e.g. https://example.okta.com, https://example.oktapreview.com), found on the Developer Dashboard, in the upper right.
|
||||
order: 1
|
||||
clientId:
|
||||
title: Client ID
|
||||
type: String
|
||||
hint: 20 chars alphanumeric string
|
||||
maxWidth: 400
|
||||
order: 2
|
||||
clientSecret:
|
||||
title: Client Secret
|
||||
type: String
|
||||
hint: 40 chars alphanumeric string with a hyphen(s)
|
||||
maxWidth: 600
|
||||
order: 3
|
||||
idp:
|
||||
title: Identity Provider ID (idp)
|
||||
type: String
|
||||
hint: (Optional) - 20 chars alphanumeric string
|
||||
maxWidth: 400
|
||||
order: 4
|
||||
|
@@ -45,6 +45,7 @@ props:
|
||||
type: String
|
||||
title: Signature Algorithm
|
||||
hint: Signature algorithm used for signing requests
|
||||
maxWidth: 400
|
||||
order: 7
|
||||
default: sha1
|
||||
enum:
|
||||
@@ -96,6 +97,7 @@ props:
|
||||
type: String
|
||||
title: Request Binding
|
||||
hint: Binding used for request authentication from IDP.
|
||||
maxWidth: 400
|
||||
order: 15
|
||||
default: 'HTTP-POST'
|
||||
enum:
|
||||
|
@@ -6,7 +6,7 @@ logo: https://static.requarks.io/logo/commento.svg
|
||||
website: https://commento.io/
|
||||
displayMode: footer
|
||||
codeTemplate: true
|
||||
isAvailable: true
|
||||
isAvailable: false
|
||||
props:
|
||||
instanceUrl:
|
||||
type: String
|
||||
|
@@ -8,12 +8,16 @@ displayMode: dynamic
|
||||
codeTemplate: false
|
||||
isAvailable: true
|
||||
props:
|
||||
displayMode:
|
||||
akismet:
|
||||
type: String
|
||||
title: Display mode
|
||||
default: 'page'
|
||||
enum:
|
||||
- inline
|
||||
- page
|
||||
hint: Whether to display the comments under the content (inline) or on a dedicated page (page).
|
||||
title: Akismet API Key
|
||||
default: ''
|
||||
hint: 'Prevent spam by using the Akismet service. Enter your API key here to enable. Leave empty to disable.'
|
||||
order: 1
|
||||
minDelay:
|
||||
type: Number
|
||||
title: Post delay
|
||||
default: 30
|
||||
hint: 'Minimum delay (in seconds) between comments per IP address.'
|
||||
maxWidth: 400
|
||||
order: 2
|
||||
|
@@ -6,7 +6,7 @@ logo: https://static.requarks.io/logo/disqus.svg
|
||||
website: https://disqus.com/
|
||||
displayMode: footer
|
||||
codeTemplate: true
|
||||
isAvailable: true
|
||||
isAvailable: false
|
||||
props:
|
||||
accountName:
|
||||
type: String
|
||||
|
Reference in New Issue
Block a user