Skip to content

Commit 76967f1

Browse files
committed
is_admin: qualifiers
1 parent 7854899 commit 76967f1

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

+stdlib/is_admin.m

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,19 @@
66
if stdlib.has_python()
77
if isunix()
88
y = py.os.getuid() == 0;
9-
else
9+
return
10+
elseif ~isMATLABReleaseOlderThan('R2024a')
1011
shell32 = py.ctypes.WinDLL('shell32');
1112

1213
% this is a key step vs. simply py.ctypes.windll.shell32.IsUserAnAdmin()
1314
f = py.getattr(shell32, 'IsUserAnAdmin');
1415

1516
y = logical(f());
17+
return
1618
end
17-
elseif stdlib.isoctave()
19+
end
20+
21+
if stdlib.isoctave()
1822
y = getuid() == 0;
1923
elseif ispc() && stdlib.has_dotnet()
2024
% com.sun.security.auth.module.NTSystem().getGroupIDs();

0 commit comments

Comments
 (0)