mirror of
https://github.com/OpenSignLabs/OpenSign.git
synced 2026-09-07 10:17:39 +02:00
feat: add user from, show deparments, users in pages
This commit is contained in:
@@ -44,8 +44,8 @@ import GetPublicUserName from './parsefunction/GetPublicUserName.js';
|
||||
import GetPublicTemplate from './parsefunction/GetPublicTemplate.js';
|
||||
import ssoSignin from './parsefunction/ssoSignin.js';
|
||||
import isextenduser from './parsefunction/isextenduser.js';
|
||||
import getUserByOrgId from './parsefunction/getuserbyOrgId.js';
|
||||
import getUserList from './parsefunction/getUserList.js';
|
||||
import getUserByOrg from './parsefunction/getUserByOrg.js';
|
||||
import getUserListByOrg from './parsefunction/getUserListByOrg.js';
|
||||
|
||||
// This afterSave function triggers after an object is added or updated in the specified class, allowing for post-processing logic.
|
||||
Parse.Cloud.afterSave('contracts_Document', DocumentAftersave);
|
||||
@@ -100,5 +100,5 @@ Parse.Cloud.define('getpublicusername', GetPublicUserName);
|
||||
Parse.Cloud.define('getpublictemplate', GetPublicTemplate);
|
||||
Parse.Cloud.define('ssosign', ssoSignin);
|
||||
Parse.Cloud.define('isextenduser', isextenduser);
|
||||
Parse.Cloud.define('getuserbyorgid', getUserByOrgId);
|
||||
Parse.Cloud.define('getuserlist', getUserList);
|
||||
Parse.Cloud.define('getuserbyorg', getUserByOrg);
|
||||
Parse.Cloud.define('getuserlistbyorg', getUserListByOrg);
|
||||
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
export default async function getUserByOrgId(req) {
|
||||
export default async function getUserByOrg(req) {
|
||||
const OrganizationId = req.params.organizationId;
|
||||
const orgPtr = {
|
||||
__type: 'Pointer',
|
||||
@@ -10,6 +10,7 @@ export default async function getUserByOrgId(req) {
|
||||
} else {
|
||||
try {
|
||||
const extUser = new Parse.Query('contracts_Users');
|
||||
extUser.include('DepartmentIds');
|
||||
extUser.equalTo('OrganizationId', orgPtr);
|
||||
const userRes = await extUser.first({ useMasterKey: true });
|
||||
if (userRes.length > 0) {
|
||||
+2
-1
@@ -1,4 +1,4 @@
|
||||
export default async function getUserList(req) {
|
||||
export default async function getUserListByOrg(req) {
|
||||
const OrganizationId = req.params.organizationId;
|
||||
const orgPtr = {
|
||||
__type: 'Pointer',
|
||||
@@ -11,6 +11,7 @@ export default async function getUserList(req) {
|
||||
try {
|
||||
const extUser = new Parse.Query('contracts_Users');
|
||||
extUser.equalTo('OrganizationId', orgPtr);
|
||||
extUser.include('DepartmentIds');
|
||||
const userRes = await extUser.find({ useMasterKey: true });
|
||||
if (userRes.length > 0) {
|
||||
const _userRes = JSON.parse(JSON.stringify(userRes));
|
||||
Reference in New Issue
Block a user