@sasjs/core 4.28.0 → 4.29.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/server/ms_getusers.sas +11 -6
package/package.json
CHANGED
package/server/ms_getusers.sas
CHANGED
|
@@ -8,12 +8,17 @@
|
|
|
8
8
|
|
|
9
9
|
%ms_getusers(outds=userlist)
|
|
10
10
|
|
|
11
|
-
Filtering for a group:
|
|
11
|
+
Filtering for a group by group name:
|
|
12
12
|
|
|
13
13
|
%ms_getusers(outds=work.groupmembers, group=GROUPNAME)
|
|
14
14
|
|
|
15
|
+
Filtering for a group by group id:
|
|
16
|
+
|
|
17
|
+
%ms_getusers(outds=work.groupmembers, gid=1)
|
|
18
|
+
|
|
15
19
|
@param [in] mdebug= (0) Set to 1 to enable DEBUG messages
|
|
16
20
|
@param [in] group= (0) Set to a group name to filter members for that group
|
|
21
|
+
@param [in] gid= (0) Set to a group id to filter members for that group
|
|
17
22
|
@param [out] outds= (work.ms_getusers) This output dataset will contain the
|
|
18
23
|
list of user accounts. Format:
|
|
19
24
|
|DISPLAYNAME:$60.|USERNAME:$30.|ID:best.|
|
|
@@ -25,7 +30,6 @@
|
|
|
25
30
|
|`New User `|`newuser `|`5`|
|
|
26
31
|
|
|
27
32
|
|
|
28
|
-
|
|
29
33
|
<h4> SAS Macros </h4>
|
|
30
34
|
@li mf_getuniquefileref.sas
|
|
31
35
|
@li mf_getuniquelibref.sas
|
|
@@ -41,6 +45,7 @@
|
|
|
41
45
|
%macro ms_getusers(
|
|
42
46
|
outds=work.ms_getusers,
|
|
43
47
|
group=0,
|
|
48
|
+
gid=0,
|
|
44
49
|
mdebug=0
|
|
45
50
|
);
|
|
46
51
|
|
|
@@ -75,9 +80,9 @@ run;
|
|
|
75
80
|
run;
|
|
76
81
|
%end;
|
|
77
82
|
|
|
78
|
-
%if "&group"
|
|
79
|
-
%else %let url=/SASjsApi/group
|
|
80
|
-
|
|
83
|
+
%if "&group" ne "0" %then %let url=/SASjsApi/group/by/groupname/&group;
|
|
84
|
+
%else %if "&gid" ne "0" %then %let url=/SASjsApi/group/&gid;
|
|
85
|
+
%else %let url=/SASjsApi/user;
|
|
81
86
|
|
|
82
87
|
proc http method='GET' headerin=&fref0 out=&fref1
|
|
83
88
|
url="&_sasjs_apiserverurl.&url";
|
|
@@ -95,7 +100,7 @@ run;
|
|
|
95
100
|
|
|
96
101
|
libname &libref JSON fileref=&fref1;
|
|
97
102
|
|
|
98
|
-
%if "&group"="0" %then %do;
|
|
103
|
+
%if "&group"="0" and "&gid"="0" %then %do;
|
|
99
104
|
data &outds;
|
|
100
105
|
length DISPLAYNAME $60 USERNAME:$30 ID 8;
|
|
101
106
|
set &libref..root;
|