Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
P
proview
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Esteban Blanc
proview
Commits
c68d1b6d
Commit
c68d1b6d
authored
Jun 25, 2008
by
claes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Default privilege fetched from Security object
parent
4bca1630
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
6 deletions
+26
-6
java/jpwr/rt_client/src/Gdh.java
java/jpwr/rt_client/src/Gdh.java
+26
-6
No files found.
java/jpwr/rt_client/src/Gdh.java
View file @
c68d1b6d
/*
* Proview $Id: Gdh.java,v 1.1
2 2007-09-17 15:35:28
claes Exp $
* Proview $Id: Gdh.java,v 1.1
3 2008-06-25 07:59:42
claes Exp $
* Copyright (C) 2005 SSAB Oxelsund AB.
*
* This program is free software; you can redistribute it and/or
...
...
@@ -93,7 +93,8 @@ public class Gdh
private
static
String
currentSystemGroup
=
null
;
private
static
String
currentUser
=
null
;
private
static
String
currentPassword
=
null
;
private
static
int
currentPrivilege
=
Pwr
.
mPrv_RtRead
;
private
static
int
currentPrivilege
=
0
;
// Pwr.mPrv_RtRead;
private
static
int
defaultPrivilege
=
0
;
Socket
gdhSocket
;
ObjectOutputStream
out
;
...
...
@@ -127,12 +128,15 @@ public class Gdh
out
=
new
ObjectOutputStream
(
new
BufferedOutputStream
(
gdhSocket
.
getOutputStream
()));
in
=
new
ObjectInputStream
(
new
BufferedInputStream
(
gdhSocket
.
getInputStream
()));
poll
();
getDefaultPrivilege
();
}
catch
(
UnknownHostException
e
)
{
System
.
err
.
println
(
"Don't know about host
: taranis.
"
);
System
.
err
.
println
(
"Don't know about host"
);
System
.
exit
(
1
);
}
catch
(
IOException
e
)
...
...
@@ -1308,6 +1312,22 @@ public class Gdh
}
private
void
getDefaultPrivilege
()
{
CdhrObjid
oretSec
=
getClassList
(
Pwrs
.
cClass_Security
);
if
(
oretSec
.
evenSts
())
return
;
CdhrString
sret
=
objidToName
(
oretSec
.
objid
,
Cdh
.
mName_volumeStrict
);
if
(
sret
.
evenSts
())
return
;
String
s
=
sret
.
str
+
".DefaultWebPriv"
;
CdhrInt
sretint
=
getObjectInfoInt
(
s
);
if
(
sretint
.
evenSts
())
return
;
defaultPrivilege
=
sretint
.
value
;
currentPrivilege
=
defaultPrivilege
;
System
.
out
.
println
(
"Default privilege : "
+
defaultPrivilege
);
}
public
CdhrObjid
getClassList
(
int
classid
)
{
try
...
...
@@ -1392,7 +1412,7 @@ public class Gdh
public
int
login
(
String
user
,
String
password
)
{
// Fetch system group
String
systemGroup
=
"
SSAB
"
;
String
systemGroup
=
"
NotUsed
"
;
try
{
out
.
writeInt
(
CHECK_USER
);
...
...
@@ -1426,7 +1446,7 @@ public class Gdh
currentSystemGroup
=
null
;
currentUser
=
null
;
currentPassword
=
null
;
currentPrivilege
=
Pwr
.
mPrv_RtRead
;
currentPrivilege
=
defaultPrivilege
;
//
Pwr.mPrv_RtRead;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment