- removed all controller methods from 'app/Controlles/Http/Admin/UsersControllers.ts' - merged all authentication methods inside 'app/Controllers/Http/Auth/UserController.ts'
This commit is contained in:
parent
68928b5e07
commit
4efa53673f
|
@ -4,10 +4,10 @@ import Role from 'App/Models/Role';
|
||||||
import type { ModelQueryBuilderContract } from '@ioc:Adonis/Lucid/Orm';
|
import type { ModelQueryBuilderContract } from '@ioc:Adonis/Lucid/Orm';
|
||||||
import CreateUserValidator from 'App/Validators/CreateUserValidator';
|
import CreateUserValidator from 'App/Validators/CreateUserValidator';
|
||||||
import UpdateUserValidator from 'App/Validators/UpdateUserValidator';
|
import UpdateUserValidator from 'App/Validators/UpdateUserValidator';
|
||||||
import { RenderResponse } from '@ioc:EidelLev/Inertia';
|
// import { RenderResponse } from '@ioc:EidelLev/Inertia';
|
||||||
|
// import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
||||||
|
// import Hash from '@ioc:Adonis/Core/Hash';
|
||||||
// import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
// import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
||||||
import Hash from '@ioc:Adonis/Core/Hash';
|
|
||||||
import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
|
||||||
|
|
||||||
export default class UsersController {
|
export default class UsersController {
|
||||||
public async index({ auth, request, inertia }: HttpContextContract) {
|
public async index({ auth, request, inertia }: HttpContextContract) {
|
||||||
|
@ -163,87 +163,6 @@ export default class UsersController {
|
||||||
return response.redirect().toRoute('user.index');
|
return response.redirect().toRoute('user.index');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Show the user a form to change their personal information & password.
|
|
||||||
*
|
|
||||||
* @return — \Inertia\Response
|
|
||||||
*/
|
|
||||||
public accountInfo({ inertia, auth }: HttpContextContract): RenderResponse {
|
|
||||||
const user = auth.user;
|
|
||||||
// const id = request.param('id');
|
|
||||||
// const user = await User.query().where('id', id).firstOrFail();
|
|
||||||
|
|
||||||
return inertia.render('Admin/User/AccountInfo', {
|
|
||||||
user: user,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Save the modified personal information for a user.
|
|
||||||
*
|
|
||||||
* @param HttpContextContract ctx
|
|
||||||
* @return : RedirectContract
|
|
||||||
*/
|
|
||||||
public async accountInfoStoreOld({ request, response, auth, session }: HttpContextContract) {
|
|
||||||
// validate update form
|
|
||||||
await request.validate(UpdateUserValidator);
|
|
||||||
|
|
||||||
const payload = request.only(['login', 'email']);
|
|
||||||
auth.user?.merge(payload);
|
|
||||||
const user = await auth.user?.save();
|
|
||||||
// $user = \Auth::user()->update($request->except(['_token']));
|
|
||||||
let message;
|
|
||||||
if (user) {
|
|
||||||
message = 'Account updated successfully.';
|
|
||||||
} else {
|
|
||||||
message = 'Error while saving. Please try again.';
|
|
||||||
}
|
|
||||||
|
|
||||||
session.flash(message);
|
|
||||||
return response.redirect().toRoute('admin.account.info');
|
|
||||||
//->with('message', __($message));
|
|
||||||
}
|
|
||||||
|
|
||||||
public async accountInfoStore({ auth, request, response, session }) {
|
|
||||||
const passwordSchema = schema.create({
|
|
||||||
old_password: schema.string({ trim: true }, [rules.required()]),
|
|
||||||
new_password: schema.string({ trim: true }, [rules.minLength(8), rules.maxLength(255), rules.confirmed('confirm_password')]),
|
|
||||||
confirm_password: schema.string({ trim: true }, [rules.required()]),
|
|
||||||
});
|
|
||||||
try {
|
|
||||||
await request.validate({ schema: passwordSchema });
|
|
||||||
} catch (error) {
|
|
||||||
// return response.badRequest(error.messages);
|
|
||||||
throw error;
|
|
||||||
}
|
|
||||||
|
|
||||||
try {
|
|
||||||
const user = await auth.user;
|
|
||||||
const { old_password, new_password } = request.only(['old_password', 'new_password']);
|
|
||||||
|
|
||||||
// if (!(old_password && new_password && confirm_password)) {
|
|
||||||
// return response.status(400).send({ warning: 'Old password and new password are required.' });
|
|
||||||
// }
|
|
||||||
|
|
||||||
// Verify if the provided old password matches the user's current password
|
|
||||||
const isSame = await Hash.verify(user.password, old_password);
|
|
||||||
if (!isSame) {
|
|
||||||
return response.flash({ warning: 'Old password is incorrect.' }).redirect().back();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Hash the new password before updating the user's password
|
|
||||||
user.password = new_password;
|
|
||||||
await user.save();
|
|
||||||
|
|
||||||
// return response.status(200).send({ message: 'Password updated successfully.' });
|
|
||||||
session.flash('Password updated successfully.');
|
|
||||||
return response.redirect().toRoute('settings.user.index');
|
|
||||||
} catch (error) {
|
|
||||||
// return response.status(500).send({ message: 'Internal server error.' });
|
|
||||||
return response.flash('warning', `Invalid server state. Internal server error.`).redirect().back();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// private async syncRoles(userId: number, roleIds: Array<number>) {
|
// private async syncRoles(userId: number, roleIds: Array<number>) {
|
||||||
// const user = await User.findOrFail(userId)
|
// const user = await User.findOrFail(userId)
|
||||||
// // const roles: Role[] = await Role.query().whereIn('id', roleIds);
|
// // const roles: Role[] = await Role.query().whereIn('id', roleIds);
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
import type { HttpContextContract } from '@ioc:Adonis/Core/HttpContext';
|
||||||
import User from 'App/Models/User';
|
import User from 'App/Models/User';
|
||||||
// import Hash from '@ioc:Adonis/Core/Hash';
|
|
||||||
// import InvalidCredentialException from 'App/Exceptions/InvalidCredentialException';
|
|
||||||
// import AuthValidator from 'App/Validators/AuthValidator';
|
|
||||||
import { RenderResponse } from '@ioc:EidelLev/Inertia';
|
import { RenderResponse } from '@ioc:EidelLev/Inertia';
|
||||||
import TwoFactorAuthProvider from 'App/Services/TwoFactorAuthProvider';
|
import TwoFactorAuthProvider from 'App/Services/TwoFactorAuthProvider';
|
||||||
|
import Hash from '@ioc:Adonis/Core/Hash';
|
||||||
|
import { schema, rules } from '@ioc:Adonis/Core/Validator';
|
||||||
|
|
||||||
// Here we are generating secret and recovery codes for the user that’s enabling 2FA and storing them to our database.
|
// Here we are generating secret and recovery codes for the user that’s enabling 2FA and storing them to our database.
|
||||||
export default class UserController {
|
export default class UserController {
|
||||||
|
@ -26,6 +25,46 @@ export default class UserController {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async accountInfoStore({ auth, request, response, session }) {
|
||||||
|
const passwordSchema = schema.create({
|
||||||
|
old_password: schema.string({ trim: true }, [rules.required()]),
|
||||||
|
new_password: schema.string({ trim: true }, [rules.minLength(8), rules.maxLength(255), rules.confirmed('confirm_password')]),
|
||||||
|
confirm_password: schema.string({ trim: true }, [rules.required()]),
|
||||||
|
});
|
||||||
|
try {
|
||||||
|
await request.validate({ schema: passwordSchema });
|
||||||
|
} catch (error) {
|
||||||
|
// return response.badRequest(error.messages);
|
||||||
|
throw error;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
const user = await auth.user;
|
||||||
|
const { old_password, new_password } = request.only(['old_password', 'new_password']);
|
||||||
|
|
||||||
|
// if (!(old_password && new_password && confirm_password)) {
|
||||||
|
// return response.status(400).send({ warning: 'Old password and new password are required.' });
|
||||||
|
// }
|
||||||
|
|
||||||
|
// Verify if the provided old password matches the user's current password
|
||||||
|
const isSame = await Hash.verify(user.password, old_password);
|
||||||
|
if (!isSame) {
|
||||||
|
return response.flash({ warning: 'Old password is incorrect.' }).redirect().back();
|
||||||
|
}
|
||||||
|
|
||||||
|
// Hash the new password before updating the user's password
|
||||||
|
user.password = new_password;
|
||||||
|
await user.save();
|
||||||
|
|
||||||
|
// return response.status(200).send({ message: 'Password updated successfully.' });
|
||||||
|
session.flash('Password updated successfully.');
|
||||||
|
return response.redirect().toRoute('settings.user.index');
|
||||||
|
} catch (error) {
|
||||||
|
// return response.status(500).send({ message: 'Internal server error.' });
|
||||||
|
return response.flash('warning', `Invalid server state. Internal server error.`).redirect().back();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public async enableTwoFactorAuthentication({ auth, response, session }: HttpContextContract): Promise<void> {
|
public async enableTwoFactorAuthentication({ auth, response, session }: HttpContextContract): Promise<void> {
|
||||||
// const user: User | undefined = auth?.user;
|
// const user: User | undefined = auth?.user;
|
||||||
const user = (await User.find(auth.user?.id)) as User;
|
const user = (await User.find(auth.user?.id)) as User;
|
||||||
|
|
|
@ -1,48 +1,3 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
|
||||||
<root>
|
|
||||||
<Dataset>
|
|
||||||
<Rdr_Dataset Id="306" PublisherName="GeoSphere Austria" PublishId="213"
|
|
||||||
CreatingCorporation="Tethys RDR" Language="en" ServerState="published"
|
|
||||||
Type="measurementdata">
|
|
||||||
<CreatedAt Year="2023" Month="11" Day="30" Hour="10" Minute="20" Second="58"
|
|
||||||
UnixTimestamp="1701336058" Timezone="Europe/Berlin" />
|
|
||||||
<ServerDateModified Year="2024" Month="1" Day="22" Hour="12" Minute="28" Second="17"
|
|
||||||
UnixTimestamp="1705922897" Timezone="Europe/Berlin" />
|
|
||||||
<ServerDatePublished Year="2024" Month="1" Day="22" Hour="12" Minute="28" Second="8"
|
|
||||||
UnixTimestamp="1705922888" Timezone="Europe/Berlin" />
|
|
||||||
<TitleMain Id="682" DocumentId="306" Type="Main" Value="rewerewr" Language="en" />
|
|
||||||
<TitleAbstract Id="1017" DocumentId="306" Type="Abstract" Value="rewrewr" Language="en" />
|
|
||||||
<Licence Id="1" Active="true"
|
|
||||||
LinkLicence="https://creativecommons.org/licenses/by/4.0/deed.en"
|
|
||||||
LinkLogo="https://licensebuttons.net/l/by/4.0/88x31.png"
|
|
||||||
NameLong="Creative Commons Attribution 4.0 International (CC BY 4.0)"
|
|
||||||
Name="CC-BY-4.0" SortOrder="1" />
|
|
||||||
<PersonAuthor Id="1" Email="m.moser@univie.ac.at" FirstName="Michael" LastName="Moser"
|
|
||||||
Status="true" NameType="Personal" Role="author" SortOrder="1"
|
|
||||||
AllowEmailContact="false" />
|
|
||||||
<PersonContributor Id="28" Email="juergen.reitner@geologie.ac.at" FirstName="Jürgen"
|
|
||||||
LastName="Reitner" Status="false" NameType="Personal" Role="contributor"
|
|
||||||
SortOrder="1" AllowEmailContact="false" />
|
|
||||||
<Subject Id="143" Language="de" Type="Geoera" Value="Aletshausen-Langenneufnach Störung"
|
|
||||||
CreatedAt="2023-11-21 17:17:43" UpdatedAt="2023-11-21 17:17:43" />
|
|
||||||
<Subject Id="164" Language="de" Type="Geoera" Value="Wolfersberg-Moosach Störung"
|
|
||||||
ExternalKey="https://data.geoscience.earth/ncl/geoera/hotLime/faults/3503"
|
|
||||||
CreatedAt="2023-11-30 10:20:58" UpdatedAt="2023-11-30 10:20:58" />
|
|
||||||
<Subject Id="165" Language="en" Type="Uncontrolled" Value="wefwef"
|
|
||||||
CreatedAt="2023-11-30 10:20:58" UpdatedAt="2023-11-30 10:20:58" />
|
|
||||||
<File Id="1037" DocumentId="306" PathName="files/306/file-clpkzkkgq0001nds14fua5um6.png"
|
|
||||||
Label="freieIP.png" MimeType="image/png" FileSize="112237" VisibleInFrontdoor="true"
|
|
||||||
VisibleInOai="true" SortOrder="0" CreatedAt="2023-11-30 10:21:14"
|
|
||||||
UpdatedAt="2023-11-30 10:21:14" />
|
|
||||||
<Coverage Id="284" DatasetId="306" XMin="11.71142578125" XMax="14.414062500000002"
|
|
||||||
YMin="46.58906908309185" YMax="47.45780853075031" CreatedAt="2023-11-30 10:20:58"
|
|
||||||
UpdatedAt="2023-11-30 10:20:58" />
|
|
||||||
<Collection Id="21" RoleId="3" Number="551" Name="Geology, hydrology, meteorology"
|
|
||||||
ParentId="20" Visible="true" VisiblePublish="true" />
|
|
||||||
</Rdr_Dataset>
|
|
||||||
</Dataset>
|
|
||||||
</root>
|
|
||||||
|
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<resource xmlns:dc="http://purl.org/dc/elements/1.1/"
|
<resource xmlns:dc="http://purl.org/dc/elements/1.1/"
|
||||||
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
|
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
|
||||||
|
|
|
@ -35,6 +35,7 @@ import { ValidationException } from '@ioc:Adonis/Core/Validator';
|
||||||
import Drive from '@ioc:Adonis/Core/Drive';
|
import Drive from '@ioc:Adonis/Core/Drive';
|
||||||
import { Exception } from '@adonisjs/core/build/standalone';
|
import { Exception } from '@adonisjs/core/build/standalone';
|
||||||
import { MultipartFileContract } from '@ioc:Adonis/Core/BodyParser';
|
import { MultipartFileContract } from '@ioc:Adonis/Core/BodyParser';
|
||||||
|
import * as crypto from 'crypto';
|
||||||
|
|
||||||
export default class DatasetController {
|
export default class DatasetController {
|
||||||
public async index({ auth, request, inertia }: HttpContextContract) {
|
public async index({ auth, request, inertia }: HttpContextContract) {
|
||||||
|
@ -433,7 +434,8 @@ export default class DatasetController {
|
||||||
// clientName: 'Gehaltsschema.png'
|
// clientName: 'Gehaltsschema.png'
|
||||||
// extname: 'png'
|
// extname: 'png'
|
||||||
// fieldName: 'file'
|
// fieldName: 'file'
|
||||||
const fileName = `file-${cuid()}.${file.extname}`;
|
// const fileName = `file-${this.generateRandomString(32)}.${file.extname}`;
|
||||||
|
const fileName = this.generateFilename(file.extname as string);
|
||||||
const mimeType = file.headers['content-type'] || 'application/octet-stream'; // Fallback to a default MIME type
|
const mimeType = file.headers['content-type'] || 'application/octet-stream'; // Fallback to a default MIME type
|
||||||
const datasetFolder = `files/${dataset.id}`;
|
const datasetFolder = `files/${dataset.id}`;
|
||||||
// const size = file.size;
|
// const size = file.size;
|
||||||
|
@ -460,6 +462,20 @@ export default class DatasetController {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private generateRandomString(length: number): string {
|
||||||
|
return crypto.randomBytes(Math.ceil(length / 2)).toString('hex').slice(0, length);
|
||||||
|
}
|
||||||
|
|
||||||
|
private generateFilename(extension: string): string {
|
||||||
|
const randomString1 = this.generateRandomString(8);
|
||||||
|
const randomString2 = this.generateRandomString(4);
|
||||||
|
const randomString3 = this.generateRandomString(4);
|
||||||
|
const randomString4 = this.generateRandomString(4);
|
||||||
|
const randomString5 = this.generateRandomString(12);
|
||||||
|
|
||||||
|
return `file-${randomString1}-${randomString2}-${randomString3}-${randomString4}-${randomString5}.${extension}`;
|
||||||
|
}
|
||||||
|
|
||||||
private async scanFileForViruses(filePath, host?: string, port?: number): Promise<void> {
|
private async scanFileForViruses(filePath, host?: string, port?: number): Promise<void> {
|
||||||
// const clamscan = await (new ClamScan().init());
|
// const clamscan = await (new ClamScan().init());
|
||||||
const opts: ClamScan.Options = {
|
const opts: ClamScan.Options = {
|
||||||
|
|
117
package-lock.json
generated
117
package-lock.json
generated
|
@ -3662,9 +3662,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@redis/client": {
|
"node_modules/@redis/client": {
|
||||||
"version": "1.5.13",
|
"version": "1.5.14",
|
||||||
"resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.13.tgz",
|
"resolved": "https://registry.npmjs.org/@redis/client/-/client-1.5.14.tgz",
|
||||||
"integrity": "sha512-epkUM9D0Sdmt93/8Ozk43PNjLi36RZzG+d/T1Gdu5AI8jvghonTeLYV69WVWdilvFo+PYxbP0TZ0saMvr6nscQ==",
|
"integrity": "sha512-YGn0GqsRBFUQxklhY7v562VMOP0DcmlrHHs3IV1mFE3cbxe31IITUkqhBcIhVSI/2JqtWAJXg5mjV4aU+zD0HA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"cluster-key-slot": "1.1.2",
|
"cluster-key-slot": "1.1.2",
|
||||||
"generic-pool": "3.9.0",
|
"generic-pool": "3.9.0",
|
||||||
|
@ -4081,9 +4081,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/express-serve-static-core": {
|
"node_modules/@types/express-serve-static-core": {
|
||||||
"version": "4.17.42",
|
"version": "4.17.43",
|
||||||
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.42.tgz",
|
"resolved": "https://registry.npmjs.org/@types/express-serve-static-core/-/express-serve-static-core-4.17.43.tgz",
|
||||||
"integrity": "sha512-ckM3jm2bf/MfB3+spLPWYPUH573plBFwpOhqQ2WottxYV85j1HQFlxmnTq57X1yHY9awZPig06hL/cLMgNWHIQ==",
|
"integrity": "sha512-oaYtiBirUOPQGSWNGPWnzyAFJ0BP3cwvN4oWZQY+zUBwpVIGsKUkpBpSztp74drYcjavs7SKFZ4DX1V2QeN8rg==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@types/node": "*",
|
"@types/node": "*",
|
||||||
|
@ -4382,9 +4382,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@types/validator": {
|
"node_modules/@types/validator": {
|
||||||
"version": "13.11.8",
|
"version": "13.11.9",
|
||||||
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.8.tgz",
|
"resolved": "https://registry.npmjs.org/@types/validator/-/validator-13.11.9.tgz",
|
||||||
"integrity": "sha512-c/hzNDBh7eRF+KbCf+OoZxKbnkpaK/cKp9iLQWqB7muXtM+MtL9SUUH8vCFcLn6dH1Qm05jiexK0ofWY7TfOhQ=="
|
"integrity": "sha512-FCTsikRozryfayPuiI46QzH3fnrOoctTjvOYZkho9BTFLCOZ2rgZJHMOVgCOfttjPJcgOx52EpkY0CMfy87MIw=="
|
||||||
},
|
},
|
||||||
"node_modules/@types/ws": {
|
"node_modules/@types/ws": {
|
||||||
"version": "8.5.10",
|
"version": "8.5.10",
|
||||||
|
@ -6298,13 +6298,17 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/call-bind": {
|
"node_modules/call-bind": {
|
||||||
"version": "1.0.5",
|
"version": "1.0.6",
|
||||||
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",
|
"resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.6.tgz",
|
||||||
"integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",
|
"integrity": "sha512-Mj50FLHtlsoVfRfnHaZvyrooHcrlceNZdL/QBvJJVd9Ta55qCQK0gs4ss2oZDeV9zFCs6ewzYgVE5yfVmfFpVg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
"function-bind": "^1.1.2",
|
"function-bind": "^1.1.2",
|
||||||
"get-intrinsic": "^1.2.1",
|
"get-intrinsic": "^1.2.3",
|
||||||
"set-function-length": "^1.1.1"
|
"set-function-length": "^1.2.0"
|
||||||
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
},
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
|
@ -6368,9 +6372,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/caniuse-lite": {
|
"node_modules/caniuse-lite": {
|
||||||
"version": "1.0.30001583",
|
"version": "1.0.30001584",
|
||||||
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001583.tgz",
|
"resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001584.tgz",
|
||||||
"integrity": "sha512-acWTYaha8xfhA/Du/z4sNZjHUWjkiuoAi2LM+T/aL+kemKQgPT1xBb/YKjlQ0Qo8gvbHsGNplrEJ+9G3gL7i4Q==",
|
"integrity": "sha512-LOz7CCQ9M1G7OjJOF9/mzmqmj3jE/7VOmrfw6Mgs0E8cjOsbRXQJHsPBfmBOXDskXKrHLyyW3n7kpDW/4BsfpQ==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
|
@ -7643,13 +7647,14 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/define-data-property": {
|
"node_modules/define-data-property": {
|
||||||
"version": "1.1.1",
|
"version": "1.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/define-data-property/-/define-data-property-1.1.2.tgz",
|
||||||
"integrity": "sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==",
|
"integrity": "sha512-SRtsSqsDbgpJBbW3pABMCOt6rQyeM8s8RiyeSN8jYG8sYmt/kGJejbydttUsnDs1tadr19tvhT4ShwMyoqAm4g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"get-intrinsic": "^1.2.1",
|
"es-errors": "^1.3.0",
|
||||||
|
"get-intrinsic": "^1.2.2",
|
||||||
"gopd": "^1.0.1",
|
"gopd": "^1.0.1",
|
||||||
"has-property-descriptors": "^1.0.0"
|
"has-property-descriptors": "^1.0.1"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">= 0.4"
|
"node": ">= 0.4"
|
||||||
|
@ -8121,9 +8126,9 @@
|
||||||
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
"integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow=="
|
||||||
},
|
},
|
||||||
"node_modules/electron-to-chromium": {
|
"node_modules/electron-to-chromium": {
|
||||||
"version": "1.4.655",
|
"version": "1.4.657",
|
||||||
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.655.tgz",
|
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.657.tgz",
|
||||||
"integrity": "sha512-2yszojF7vIZ68adIOvzV4bku8OZad9w5H9xF3ZAMZjPuOjBarlflUkjN6DggdV+L71WZuKUfKUhov/34+G5QHg==",
|
"integrity": "sha512-On2ymeleg6QbRuDk7wNgDdXtNqlJLM2w4Agx1D/RiTmItiL+a9oq5p7HUa2ZtkAtGBe/kil2dq/7rPfkbe0r5w==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"node_modules/emittery": {
|
"node_modules/emittery": {
|
||||||
|
@ -8240,15 +8245,23 @@
|
||||||
"stackframe": "^1.3.4"
|
"stackframe": "^1.3.4"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/es-errors": {
|
||||||
|
"version": "1.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz",
|
||||||
|
"integrity": "sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==",
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/es-module-lexer": {
|
"node_modules/es-module-lexer": {
|
||||||
"version": "0.3.26",
|
"version": "0.3.26",
|
||||||
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.3.26.tgz",
|
"resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-0.3.26.tgz",
|
||||||
"integrity": "sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA=="
|
"integrity": "sha512-Va0Q/xqtrss45hWzP8CZJwzGSZJjDM5/MJRE3IXXnUCcVLElR9BRaE9F62BopysASyc4nM3uwhSW7FFB9nlWAA=="
|
||||||
},
|
},
|
||||||
"node_modules/escalade": {
|
"node_modules/escalade": {
|
||||||
"version": "3.1.1",
|
"version": "3.1.2",
|
||||||
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz",
|
"resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz",
|
||||||
"integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==",
|
"integrity": "sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA==",
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=6"
|
"node": ">=6"
|
||||||
}
|
}
|
||||||
|
@ -8981,9 +8994,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/fastq": {
|
"node_modules/fastq": {
|
||||||
"version": "1.17.0",
|
"version": "1.17.1",
|
||||||
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz",
|
"resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.1.tgz",
|
||||||
"integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==",
|
"integrity": "sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"reusify": "^1.0.4"
|
"reusify": "^1.0.4"
|
||||||
|
@ -9384,15 +9397,19 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/get-intrinsic": {
|
"node_modules/get-intrinsic": {
|
||||||
"version": "1.2.2",
|
"version": "1.2.4",
|
||||||
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",
|
"resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz",
|
||||||
"integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",
|
"integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"es-errors": "^1.3.0",
|
||||||
"function-bind": "^1.1.2",
|
"function-bind": "^1.1.2",
|
||||||
"has-proto": "^1.0.1",
|
"has-proto": "^1.0.1",
|
||||||
"has-symbols": "^1.0.3",
|
"has-symbols": "^1.0.3",
|
||||||
"hasown": "^2.0.0"
|
"hasown": "^2.0.0"
|
||||||
},
|
},
|
||||||
|
"engines": {
|
||||||
|
"node": ">= 0.4"
|
||||||
|
},
|
||||||
"funding": {
|
"funding": {
|
||||||
"url": "https://github.com/sponsors/ljharb"
|
"url": "https://github.com/sponsors/ljharb"
|
||||||
}
|
}
|
||||||
|
@ -11582,9 +11599,9 @@
|
||||||
"integrity": "sha512-QS9p+Q20YBxpE0dJBnF6CPURP7p1GUsxnhTxTWH5nG3A1F5w8Rg3T4Xyh5UlrFSbHp88oOciVP/0agsNLhkHdQ=="
|
"integrity": "sha512-QS9p+Q20YBxpE0dJBnF6CPURP7p1GUsxnhTxTWH5nG3A1F5w8Rg3T4Xyh5UlrFSbHp88oOciVP/0agsNLhkHdQ=="
|
||||||
},
|
},
|
||||||
"node_modules/magic-string": {
|
"node_modules/magic-string": {
|
||||||
"version": "0.30.6",
|
"version": "0.30.7",
|
||||||
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.6.tgz",
|
"resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.7.tgz",
|
||||||
"integrity": "sha512-n62qCLbPjNjyo+owKtveQxZFZTBm+Ms6YoGD23Wew6Vw337PElFNifQpknPruVRQV57kVShPnLGo9vWxVhpPvA==",
|
"integrity": "sha512-8vBuFF/I/+OSLRmdf2wwFCJCz+nSn0m6DPvGH1fS/KiQoSaR+sETbov0eIk9KhEKy8CYqIkIAnbohxT/4H0kuA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@jridgewell/sourcemap-codec": "^1.4.15"
|
"@jridgewell/sourcemap-codec": "^1.4.15"
|
||||||
},
|
},
|
||||||
|
@ -13375,9 +13392,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/postcss": {
|
"node_modules/postcss": {
|
||||||
"version": "8.4.33",
|
"version": "8.4.34",
|
||||||
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.33.tgz",
|
"resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.34.tgz",
|
||||||
"integrity": "sha512-Kkpbhhdjw2qQs2O2DGX+8m5OVqEcbB9HRBvuYM9pgrjEFUg30A9LmXNlTAUj4S9kgtGyrMbTzVjH7E+s5Re2yg==",
|
"integrity": "sha512-4eLTO36woPSocqZ1zIrFD2K1v6wH7pY1uBh0JIM2KKfrVtGvPFiAku6aNOP0W1Wr9qwnaCsF0Z+CrVnryB2A8Q==",
|
||||||
"funding": [
|
"funding": [
|
||||||
{
|
{
|
||||||
"type": "opencollective",
|
"type": "opencollective",
|
||||||
|
@ -14043,9 +14060,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/prettier": {
|
"node_modules/prettier": {
|
||||||
"version": "3.2.4",
|
"version": "3.2.5",
|
||||||
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.4.tgz",
|
"resolved": "https://registry.npmjs.org/prettier/-/prettier-3.2.5.tgz",
|
||||||
"integrity": "sha512-FWu1oLHKCrtpO1ypU6J0SbK2d9Ckwysq6bHj/uaCP26DxrPpppCLQRGVuqAxSTvhF00AcvDRyYrLNW7ocBhFFQ==",
|
"integrity": "sha512-3/GWa9aOC0YeD7LUfvOG2NiDyhOWRvt1k+rcKhOuYnMY24iiCphgneUfJDyFXd6rZCAnuLBv6UeAULtrhT/F4A==",
|
||||||
"dev": true,
|
"dev": true,
|
||||||
"bin": {
|
"bin": {
|
||||||
"prettier": "bin/prettier.cjs"
|
"prettier": "bin/prettier.cjs"
|
||||||
|
@ -14416,12 +14433,12 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/redis": {
|
"node_modules/redis": {
|
||||||
"version": "4.6.12",
|
"version": "4.6.13",
|
||||||
"resolved": "https://registry.npmjs.org/redis/-/redis-4.6.12.tgz",
|
"resolved": "https://registry.npmjs.org/redis/-/redis-4.6.13.tgz",
|
||||||
"integrity": "sha512-41Xuuko6P4uH4VPe5nE3BqXHB7a9lkFL0J29AlxKaIfD6eWO8VO/5PDF9ad2oS+mswMsfFxaM5DlE3tnXT+P8Q==",
|
"integrity": "sha512-MHgkS4B+sPjCXpf+HfdetBwbRz6vCtsceTmw1pHNYJAsYxrfpOP6dz+piJWGos8wqG7qb3vj/Rrc5qOlmInUuA==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@redis/bloom": "1.2.0",
|
"@redis/bloom": "1.2.0",
|
||||||
"@redis/client": "1.5.13",
|
"@redis/client": "1.5.14",
|
||||||
"@redis/graph": "1.1.1",
|
"@redis/graph": "1.1.1",
|
||||||
"@redis/json": "1.0.6",
|
"@redis/json": "1.0.6",
|
||||||
"@redis/search": "1.1.6",
|
"@redis/search": "1.1.6",
|
||||||
|
@ -14899,9 +14916,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/semver": {
|
"node_modules/semver": {
|
||||||
"version": "7.5.4",
|
"version": "7.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/semver/-/semver-7.5.4.tgz",
|
"resolved": "https://registry.npmjs.org/semver/-/semver-7.6.0.tgz",
|
||||||
"integrity": "sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA==",
|
"integrity": "sha512-EnwXhrlwXMk9gKu5/flx5sv/an57AkRplG3hTK68W7FRDN+k+OWBj65M7719OkA82XLBxrcX0KSHj+X5COhOVg==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"lru-cache": "^6.0.0"
|
"lru-cache": "^6.0.0"
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { Head } from '@inertiajs/vue3';
|
import { Head } from '@inertiajs/vue3';
|
||||||
import { computed, ref, onMounted } from 'vue';
|
import { computed, onMounted } from 'vue';
|
||||||
import { MainService } from '@/Stores/main';
|
import { MainService } from '@/Stores/main';
|
||||||
// import { Inertia } from '@inertiajs/inertia';
|
// import { Inertia } from '@inertiajs/inertia';
|
||||||
import {
|
import {
|
||||||
|
|
|
@ -150,9 +150,9 @@ Route.get('/settings/user/security', 'UserController.accountInfo')
|
||||||
.namespace('App/Controllers/Http/Auth')
|
.namespace('App/Controllers/Http/Auth')
|
||||||
.middleware(['auth']);
|
.middleware(['auth']);
|
||||||
|
|
||||||
Route.post('/settings/user/store', 'UsersController.accountInfoStore')
|
Route.post('/settings/user/store', 'UserController.accountInfoStore')
|
||||||
.as('account.password.store')
|
.as('account.password.store')
|
||||||
.namespace('App/Controllers/Http/Admin')
|
.namespace('App/Controllers/Http/Auth')
|
||||||
.middleware(['auth']);
|
.middleware(['auth']);
|
||||||
// Route::post('change-password', 'UserController@changePasswordStore')->name('admin.account.password.store');
|
// Route::post('change-password', 'UserController@changePasswordStore')->name('admin.account.password.store');
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user