From 8c6490f188c77f6fa7e45e12ebcbfbbe9f127055 Mon Sep 17 00:00:00 2001 From: Muneeb Khurshid Date: Mon, 1 Apr 2024 10:05:38 +0530 Subject: [PATCH 1/3] chore: add LA_ALL_USERS permission flag --- src/lexactivator.ts | 3 ++- src/native/LexActivator.h | 18 +++++++++++++++--- 2 files changed, 17 insertions(+), 4 deletions(-) diff --git a/src/lexactivator.ts b/src/lexactivator.ts index 97fe6d0..38a981e 100644 --- a/src/lexactivator.ts +++ b/src/lexactivator.ts @@ -1545,7 +1545,8 @@ export class LexActivator { export const PermissionFlags = { 'LA_USER': 1, 'LA_SYSTEM': 2, - 'LA_IN_MEMORY': 4 + 'LA_ALL_USERS': 3, + 'LA_IN_MEMORY': 4, }; export const ReleaseFlags = { diff --git a/src/native/LexActivator.h b/src/native/LexActivator.h index 85011f2..3d2667a 100644 --- a/src/native/LexActivator.h +++ b/src/native/LexActivator.h @@ -120,9 +120,21 @@ LEXACTIVATOR_API int LA_CC SetProductData(CSTRTYPE productData); * productId - the unique product id of your application as mentioned on the product page in the dashboard. - * flags - depending upon whether your application requires admin/root - permissions to run or not, this parameter can have one of the following - values: LA_SYSTEM, LA_USER, LA_IN_MEMORY + * flags - depending on your application's requirements, choose one of + the following values: LA_USER, LA_SYSTEM, LA_IN_MEMORY, LA_ALL_USERS. + + - LA_USER: This flag indicates that the application does not require + admin or root permissions to run. + + - LA_SYSTEM: This flag indicates that the application must be run with admin or + root permissions. + + - LA_IN_MEMORY: This flag will store activation data in memory. Thus, requires + re-activation on every start of the application and should only be used in floating + licenses. + + - LA_ALL_USERS: This flag is specifically designed for Windows and should be used + for system-wide activations. RETURN CODES: LA_OK, LA_E_WMIC, LA_E_PRODUCT_FILE, LA_E_PRODUCT_DATA, LA_E_PRODUCT_ID, LA_E_SYSTEM_PERMISSION From ec19e714fe0818a6fb16e9d3653a5f1370db3fc9 Mon Sep 17 00:00:00 2001 From: Muneeb Khurshid Date: Mon, 1 Apr 2024 10:28:57 +0530 Subject: [PATCH 2/3] chore: define LA_ALL_USERS --- src/native/LexActivator.h | 1 + 1 file changed, 1 insertion(+) diff --git a/src/native/LexActivator.h b/src/native/LexActivator.h index 3d2667a..f9bcc47 100644 --- a/src/native/LexActivator.h +++ b/src/native/LexActivator.h @@ -63,6 +63,7 @@ typedef void (LA_CC *ReleaseCallbackType)(uint32_t, CSTRTYPE, void*); #define LA_USER ((uint32_t)1) #define LA_SYSTEM ((uint32_t)2) +#define LA_ALL_USERS ((uint32_t)3) #define LA_IN_MEMORY ((uint32_t)4) #define LA_RELEASES_ALL ((uint32_t)1) From 90b937bdaff5007a3767895862601afe919e194e Mon Sep 17 00:00:00 2001 From: Muneeb Khurshid Date: Fri, 19 Apr 2024 17:10:13 +0530 Subject: [PATCH 3/3] docs: jsdoc update --- src/lexactivator.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/lexactivator.ts b/src/lexactivator.ts index 38a981e..59a33d2 100644 --- a/src/lexactivator.ts +++ b/src/lexactivator.ts @@ -156,9 +156,13 @@ export class LexActivator { * * @param {string} productId the unique product id of your application as mentioned on * the product page in the dashboard. - * @param {PermissionFlags} flag depending upon whether your application requires admin/root - * permissions to run or not, this parameter can have one of the following values: - * LA_SYSTEM, LA_USER, LA_IN_MEMORY + * @param {PermissionFlags} flag depending on your application's requirements, choose one of + * the following values: LA_USER, LA_SYSTEM, LA_IN_MEMORY, LA_ALL_USERS. + * - LA_USER: This flag indicates that the application does not require admin or root permissions to run. + * - LA_SYSTEM: This flag indicates that the application must be run with admin or root permissions. + * - LA_IN_MEMORY: This flag will store activation data in memory. Thus, requires re-activation + * on every start of the application and should only be used in floating licenses. + * - LA_ALL_USERS: This flag is specifically designed for Windows and should be used for system-wide activations. * @throws {LexActivatorException} */ static SetProductId(productId: string, flag: typeof PermissionFlags[keyof typeof PermissionFlags]): void {