Skip to content

Commit 9685538

Browse files
user privileges update: new rules
1 parent 787a21f commit 9685538

File tree

3 files changed

+5
-14
lines changed

3 files changed

+5
-14
lines changed

%WebTerminal/Engine.cls.xml

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ Use user privileges and require authorization for them</Description>
3131
Allow accessing terminal for unregistered users (unknownUser).
3232
Anyway, changing this constant to 1 can make a big hole in security,
3333
so change it at your own risk!</Description>
34-
<Default>0</Default>
34+
<Default>1</Default>
3535
</Parameter>
3636

3737
<UDLText name="T">
@@ -771,18 +771,9 @@ the client - it includes authorization key.</Description>
771771
ZNSPACE $LISTGET(lb, 7) // namespace
772772
773773
set user = $LISTGET($LISTGET(lb, 16), 1) // user
774-
if (user = "UnknownUser") && (..#allowUnknownUser '= 1) {
775-
set ok = 0
776-
do ..SendData("!UnknownUser disallowed.", ..ConstClientAuthorizationStatus)
777-
QUIT
778-
}
774+
set loginStatus = ##class(%SYSTEM.Security).Login($LISTGET($LISTGET(lb, 16), 1)) // login user
779775
780-
if (..#authorizeUsers = 1) {
781-
set loginStatus = ##class(%SYSTEM.Security).Login($LISTGET($LISTGET(lb, 16), 1))
782-
} else {
783-
set loginStatus = 1
784-
}
785-
if ($$$ISOK(loginStatus)) {
776+
if ($$$ISOK(loginStatus)) { // alert client
786777
do ..SendData(user,..ConstClientLoginInfo)
787778
} else {
788779
do ..SendData("!",..ConstClientLoginInfo)

csp/webTerminal/js/application.js.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
*/
77
var application = new function() {
88
9-
var version = "0.9.9.6 beta"; // link to language.js
9+
var version = "0.9.9.7 beta"; // link to language.js
1010
this.debug = false; // remove for release
1111
this.debugUrlPart = "172.27.25.133:57772"; // in-debug mode
1212

csp/webTerminal/js/language.js.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ var lang = new function() {
2929
0: parser.highlightHTML("/help"),
3030
1: parser.highlightHTML("/tip"),
3131
2: parser.highlightHTML("/connect"),
32-
3: "0.9.9.6 beta",
32+
3: "0.9.9.7 beta",
3333
4: 1,
3434
5: parser.highlightHTML("set test = 12"),
3535
6: parser.highlightHTML("write test"),

0 commit comments

Comments
 (0)