Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
W
website
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Releases
Container registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
Video AG Infrastruktur
website
Commits
6ccf3150
Commit
6ccf3150
authored
8 years ago
by
Julian Rother
Browse files
Options
Downloads
Patches
Plain Diff
Merged auth-columns user, passwd and param
parent
4fd41f9c
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
db_schema.sql
+2
-3
2 additions, 3 deletions
db_schema.sql
server.py
+2
-2
2 additions, 2 deletions
server.py
static/moderator.js
+8
-8
8 additions, 8 deletions
static/moderator.js
with
12 additions
and
13 deletions
db_schema.sql
+
2
−
3
View file @
6ccf3150
...
@@ -113,8 +113,7 @@ CREATE TABLE IF NOT EXISTS `auth_data` (
...
@@ -113,8 +113,7 @@ CREATE TABLE IF NOT EXISTS `auth_data` (
`video_id`
INTEGER
,
`video_id`
INTEGER
,
`auth_type`
varchar
(
10
),
`auth_type`
varchar
(
10
),
`auth_param`
varchar
(
127
),
`auth_param`
varchar
(
127
),
`auth_user`
varchar
(
127
),
`auth_param2`
varchar
(
127
),
`auth_passwd`
varchar
(
127
),
`time_created`
datetime
NOT
NULL
,
`time_created`
datetime
NOT
NULL
,
`time_updated`
datetime
NOT
NULL
,
`time_updated`
datetime
NOT
NULL
,
`created_by`
INTEGER
DEFAULT
NULL
`created_by`
INTEGER
DEFAULT
NULL
...
...
This diff is collapsed.
Click to expand it.
server.py
+
2
−
2
View file @
6ccf3150
...
@@ -96,7 +96,7 @@ def checkauth(auths, username=None, password=None):
...
@@ -96,7 +96,7 @@ def checkauth(auths, username=None, password=None):
if
auth
[
'
auth_type
'
]
==
'
public
'
:
if
auth
[
'
auth_type
'
]
==
'
public
'
:
return
True
return
True
elif
auth
[
'
auth_type
'
]
==
'
password
'
:
elif
auth
[
'
auth_type
'
]
==
'
password
'
:
if
auth
[
'
auth_
user
'
]
==
username
and
auth
[
'
auth_pa
ssword
'
]
==
password
:
if
auth
[
'
auth_
param
'
]
==
username
and
auth
[
'
auth_pa
ram2
'
]
==
password
:
return
True
return
True
elif
auth
[
'
auth_type
'
]
==
'
l2p
'
:
elif
auth
[
'
auth_type
'
]
==
'
l2p
'
:
if
auth
[
'
auth_param
'
]
in
session
.
get
(
'
l2p_courses
'
,
[]):
if
auth
[
'
auth_param
'
]
in
session
.
get
(
'
l2p_courses
'
,
[]):
...
@@ -390,7 +390,7 @@ tabs = {
...
@@ -390,7 +390,7 @@ tabs = {
[
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
[
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
'
featured
'
:
(
'
featured
'
,
'
id
'
,
[
'
title
'
,
'
text
'
,
'
internal
'
,
'
visible
'
,
'
deleted
'
],
'
featured
'
:
(
'
featured
'
,
'
id
'
,
[
'
title
'
,
'
text
'
,
'
internal
'
,
'
visible
'
,
'
deleted
'
],
[
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
[
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
'
auth
'
:
(
'
auth_data
'
,
'
auth_id
'
,
[
'
auth_type
'
,
'
auth_
user
'
,
'
auth_pa
sswd
'
,
'
deleted
'
],
'
auth
'
:
(
'
auth_data
'
,
'
auth_id
'
,
[
'
auth_type
'
,
'
auth_
param
'
,
'
auth_pa
ram2
'
,
'
deleted
'
],
[
'
course_id
'
,
'
lecture_id
'
,
'
video_id
'
,
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
[
'
course_id
'
,
'
lecture_id
'
,
'
video_id
'
,
'
created_by
'
,
'
time_created
'
,
'
time_updated
'
]),
'
sorterrorlog
'
:
(
'
sorterrorlog_data
'
,
'
id
'
,
[
'
deleted
'
],
'
sorterrorlog
'
:
(
'
sorterrorlog_data
'
,
'
id
'
,
[
'
deleted
'
],
[
'
time_created
'
,
'
time_updated
'
])
[
'
time_created
'
,
'
time_updated
'
])
...
...
This diff is collapsed.
Click to expand it.
static/moderator.js
+
8
−
8
View file @
6ccf3150
...
@@ -125,11 +125,11 @@ var moderator = {
...
@@ -125,11 +125,11 @@ var moderator = {
if
((
moderator
.
acleditor
.
acls
[
i
][
type
+
'
_id
'
]
==
id
))
{
if
((
moderator
.
acleditor
.
acls
[
i
][
type
+
'
_id
'
]
==
id
))
{
var
auth
=
{};
var
auth
=
{};
auth
.
type
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_type
'
];
auth
.
type
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_type
'
];
auth
.
user
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_
user
'
];
auth
.
param
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_
param
'
];
auth
.
pa
ssword
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_pa
sswd
'
];
auth
.
pa
ram2
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_pa
ram2
'
];
auth
.
id
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_id
'
];
auth
.
id
=
moderator
.
acleditor
.
acls
[
i
][
'
auth_id
'
];
idlist
[
idlist
.
length
]
=
auth
.
id
;
idlist
[
idlist
.
length
]
=
auth
.
id
;
html
+=
'
<option data-auth_id="
'
+
auth
.
id
+
'
">#
'
+
auth
.
id
+
'
'
+
auth
.
type
+
'
'
+
(
auth
.
type
==
"
password
"
?
'
("
'
+
auth
.
user
+
'
":"
'
+
auth
.
pa
ssword
+
'
")
'
:
''
)
+
'
</option>
'
;
html
+=
'
<option data-auth_id="
'
+
auth
.
id
+
'
">#
'
+
auth
.
id
+
'
'
+
auth
.
type
+
'
'
+
(
auth
.
type
==
"
password
"
?
'
("
'
+
auth
.
param
+
'
":"
'
+
auth
.
pa
ram2
+
'
")
'
:
''
)
+
'
</option>
'
;
}
}
}
}
html
+=
'
</select>
'
;
html
+=
'
</select>
'
;
...
@@ -155,18 +155,18 @@ var moderator = {
...
@@ -155,18 +155,18 @@ var moderator = {
var
auth
=
{};
var
auth
=
{};
auth
.
type
=
$
(
"
.authtype
"
,
element
.
parentElement
).
val
();
auth
.
type
=
$
(
"
.authtype
"
,
element
.
parentElement
).
val
();
if
(
auth
.
type
==
"
password
"
)
{
if
(
auth
.
type
==
"
password
"
)
{
auth
.
user
=
$
(
"
.authuser
"
,
element
.
parentElement
).
val
();
auth
.
param
=
$
(
"
.authuser
"
,
element
.
parentElement
).
val
();
auth
.
pa
ssword
=
$
(
"
.authpassword
"
,
element
.
parentElement
).
val
();
auth
.
pa
ram2
=
$
(
"
.authpassword
"
,
element
.
parentElement
).
val
();
}
}
dict
=
{}
dict
=
{}
dict
[
'
auth_type
'
]
=
auth
.
type
;
dict
[
'
auth_type
'
]
=
auth
.
type
;
dict
[
'
auth_
user
'
]
=
auth
.
user
;
dict
[
'
auth_
param
'
]
=
auth
.
param
;
dict
[
'
auth_pa
sswd
'
]
=
auth
.
pa
ssword
;
dict
[
'
auth_pa
ram2
'
]
=
auth
.
pa
ram2
;
dict
[
$
(
element
.
parentElement
).
data
(
'
type
'
)
+
'
_id
'
]
=
$
(
element
.
parentElement
).
data
(
'
id
'
);
dict
[
$
(
element
.
parentElement
).
data
(
'
type
'
)
+
'
_id
'
]
=
$
(
element
.
parentElement
).
data
(
'
id
'
);
moderator
.
api
.
add_new
(
dict
,
'
auth
'
,
true
);
moderator
.
api
.
add_new
(
dict
,
'
auth
'
,
true
);
var
option
=
$
(
'
<option>
'
,
{
var
option
=
$
(
'
<option>
'
,
{
"
text
"
:
auth
.
type
+
'
'
+
(
auth
.
type
==
"
password
"
?
'
("
'
+
auth
.
user
+
'
":"
'
+
auth
.
pa
ssword
+
'
")
'
:
''
)
,
"
text
"
:
auth
.
type
+
'
'
+
(
auth
.
type
==
"
password
"
?
'
("
'
+
auth
.
param
+
'
":"
'
+
auth
.
pa
ram2
+
'
")
'
:
''
)
,
"
data-auth
"
:
JSON
.
stringify
(
auth
)
"
data-auth
"
:
JSON
.
stringify
(
auth
)
});
});
$
(
"
.acllist
"
,
element
.
parentElement
).
append
(
option
);
$
(
"
.acllist
"
,
element
.
parentElement
).
append
(
option
);
...
...
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