Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
SnipeIt
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
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
OskarStenberg
SnipeIt
Commits
0b41f918
Commit
0b41f918
authored
4 years ago
by
snipe
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/develop'
parents
c90604b5
01143734
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
app/Http/Controllers/Auth/LoginController.php
+2
-2
2 additions, 2 deletions
app/Http/Controllers/Auth/LoginController.php
app/Models/Company.php
+1
-1
1 addition, 1 deletion
app/Models/Company.php
with
3 additions
and
3 deletions
app/Http/Controllers/Auth/LoginController.php
+
2
−
2
View file @
0b41f918
...
@@ -111,7 +111,7 @@ class LoginController extends Controller
...
@@ -111,7 +111,7 @@ class LoginController extends Controller
Auth
::
login
(
$user
,
true
);
Auth
::
login
(
$user
,
true
);
}
else
{
}
else
{
$username
=
$saml
->
getUsername
();
$username
=
$saml
->
getUsername
();
Log
::
error
(
"SAML user '
$username
' could not be found in database."
);
\
Log
::
warning
(
"SAML user '
$username
' could not be found in database."
);
$request
->
session
()
->
flash
(
'error'
,
trans
(
'auth/message.signin.error'
));
$request
->
session
()
->
flash
(
'error'
,
trans
(
'auth/message.signin.error'
));
$saml
->
clearData
();
$saml
->
clearData
();
}
}
...
@@ -121,7 +121,7 @@ class LoginController extends Controller
...
@@ -121,7 +121,7 @@ class LoginController extends Controller
$user
->
save
();
$user
->
save
();
}
}
}
catch
(
\Exception
$e
)
{
}
catch
(
\Exception
$e
)
{
Log
::
error
(
"There was an error authenticating the SAML user: "
.
$e
->
getMessage
());
\
Log
::
warning
(
"There was an error authenticating the SAML user: "
.
$e
->
getMessage
());
throw
new
\Exception
(
$e
->
getMessage
());
throw
new
\Exception
(
$e
->
getMessage
());
}
}
}
}
...
...
This diff is collapsed.
Click to expand it.
app/Models/Company.php
+
1
−
1
View file @
0b41f918
...
@@ -78,7 +78,7 @@ final class Company extends SnipeModel
...
@@ -78,7 +78,7 @@ final class Company extends SnipeModel
$company_id
=
null
;
$company_id
=
null
;
}
}
$table
=
(
$table_name
)
?
DB
::
getTablePrefix
()
.
$table_name
.
"."
:
''
;
$table
=
(
$table_name
)
?
$table_name
.
"."
:
''
;
if
(
\Schema
::
hasColumn
(
$query
->
getModel
()
->
getTable
(),
$column
)){
if
(
\Schema
::
hasColumn
(
$query
->
getModel
()
->
getTable
(),
$column
)){
return
$query
->
where
(
$table
.
$column
,
'='
,
$company_id
);
return
$query
->
where
(
$table
.
$column
,
'='
,
$company_id
);
...
...
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