Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Imldeployment
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
IML Open Source
Imldeployment
Commits
e351961d
Commit
e351961d
authored
5 years ago
by
hahn
Browse files
Options
Downloads
Patches
Plain Diff
task#3869 - update sws class
parent
d07a8a75
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
public_html/deployment/classes/user.class.php
+7
-6
7 additions, 6 deletions
public_html/deployment/classes/user.class.php
with
7 additions
and
6 deletions
public_html/deployment/classes/user.class.php
+
7
−
6
View file @
e351961d
...
@@ -53,15 +53,15 @@ class user {
...
@@ -53,15 +53,15 @@ class user {
/**
/**
*
detect a user
*
get string with detected user from current session / basic auth / cli access
* @return
type
* @return
string
*/
*/
private
function
_autoDetectUser
(){
private
function
_autoDetectUser
(){
$sUser
=
false
;
$sUser
=
false
;
if
(
isset
(
$_SESSION
)
&&
is
_array
(
$_SESSION
)
&&
array_key_exists
(
"PHP_AUTH_USER"
,
$_SESSION
)){
if
(
isset
(
$_SESSION
)
&&
is
set
(
$_SESSION
[
"PHP_AUTH_USER"
]
)){
$sUser
=
$_SESSION
[
"PHP_AUTH_USER"
];
$sUser
=
$_SESSION
[
"PHP_AUTH_USER"
];
}
}
if
(
!
$sUser
&&
is
_array
(
$_SERVER
)
&&
array_key_exists
(
"PHP_AUTH_USER"
,
$_SERVER
)){
if
(
!
$sUser
&&
is
set
(
$_SERVER
[
"PHP_AUTH_USER"
]
)){
$sUser
=
$_SERVER
[
"PHP_AUTH_USER"
];
$sUser
=
$_SERVER
[
"PHP_AUTH_USER"
];
}
}
if
(
php_sapi_name
()
==
"cli"
)
{
if
(
php_sapi_name
()
==
"cli"
)
{
...
@@ -137,7 +137,7 @@ class user {
...
@@ -137,7 +137,7 @@ class user {
*/
*/
public
function
authenticate
(){
public
function
authenticate
(){
global
$aConfig
,
$aParams
;
global
$aConfig
,
$aParams
;
print_r
(
$aConfig
);
if
(
!
array_key_exists
(
'auth'
,
$aConfig
)
||
!
count
(
$aConfig
[
'auth'
])
||
!
array_key_exists
(
'user'
,
$aParams
)){
if
(
!
array_key_exists
(
'auth'
,
$aConfig
)
||
!
count
(
$aConfig
[
'auth'
])
||
!
array_key_exists
(
'user'
,
$aParams
)){
return
false
;
return
false
;
}
}
...
@@ -180,10 +180,11 @@ class user {
...
@@ -180,10 +180,11 @@ class user {
}
}
/**
/**
* set a authenticated user and get its roles
* set a
n
authenticated user and get its roles
*/
*/
public
function
setUser
(){
public
function
setUser
(){
$this
->
_sUsername
=
$this
->
_autoDetectUser
();
$this
->
_sUsername
=
$this
->
_autoDetectUser
();
$this
->
_getUserGroups
();
$this
->
_getUserGroups
();
$this
->
_getUserPermission
();
$this
->
_getUserPermission
();
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment