Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
CIRCLE3
/
cloud
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
5
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
A prog2-höz tartozó friss repo anyagok itt elérhetőek:
https://git.iit.bme.hu/
Commit
2d0edccd
authored
Feb 19, 2022
by
Karsa Zoltán István
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
is_authenticated delete fun call
parent
ae1c0a7d
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
circle/dashboard/tests/test_mockedviews.py
+1
-1
circle/dashboard/views/user.py
+1
-1
circle/dashboard/views/util.py
+1
-1
No files found.
circle/dashboard/tests/test_mockedviews.py
View file @
2d0edccd
...
@@ -501,7 +501,7 @@ class RenewViewTest(unittest.TestCase):
...
@@ -501,7 +501,7 @@ class RenewViewTest(unittest.TestCase):
inst
.
_meta
.
object_name
=
"Instance"
inst
.
_meta
.
object_name
=
"Instance"
inst
.
renew
=
Instance
.
_ops
[
'renew'
](
inst
)
inst
.
renew
=
Instance
.
_ops
[
'renew'
](
inst
)
inst
.
renew
.
async
=
MagicMock
()
inst
.
renew
.
async
=
MagicMock
()
inst
.
has_level
=
lambda
user
,
level
:
user
.
is_authenticated
()
inst
.
has_level
=
lambda
user
,
level
:
user
.
is_authenticated
key
=
view
.
get_token_url
(
inst
,
user
)
.
split
(
'?'
)[
1
]
.
split
(
'='
)[
1
]
key
=
view
.
get_token_url
(
inst
,
user
)
.
split
(
'?'
)[
1
]
.
split
(
'='
)[
1
]
request
=
FakeRequestFactory
(
GET
=
{
'k'
:
key
},
authenticated
=
False
)
request
=
FakeRequestFactory
(
GET
=
{
'k'
:
key
},
authenticated
=
False
)
...
...
circle/dashboard/views/user.py
View file @
2d0edccd
...
@@ -251,7 +251,7 @@ class UnsubscribeFormView(SuccessMessageMixin, UpdateView):
...
@@ -251,7 +251,7 @@ class UnsubscribeFormView(SuccessMessageMixin, UpdateView):
success_message
=
_
(
"Successfully modified subscription."
)
success_message
=
_
(
"Successfully modified subscription."
)
def
get_success_url
(
self
):
def
get_success_url
(
self
):
if
self
.
request
.
user
.
is_authenticated
()
:
if
self
.
request
.
user
.
is_authenticated
:
return
super
(
UnsubscribeFormView
,
self
)
.
get_success_url
()
return
super
(
UnsubscribeFormView
,
self
)
.
get_success_url
()
else
:
else
:
return
self
.
request
.
path
return
self
.
request
.
path
...
...
circle/dashboard/views/util.py
View file @
2d0edccd
...
@@ -76,7 +76,7 @@ class RedirectToLoginMixin(AccessMixin):
...
@@ -76,7 +76,7 @@ class RedirectToLoginMixin(AccessMixin):
return
super
(
RedirectToLoginMixin
,
self
)
.
dispatch
(
return
super
(
RedirectToLoginMixin
,
self
)
.
dispatch
(
request
,
*
args
,
**
kwargs
)
request
,
*
args
,
**
kwargs
)
except
self
.
redirect_exception_classes
:
except
self
.
redirect_exception_classes
:
if
not
request
.
user
.
is_authenticated
()
:
if
not
request
.
user
.
is_authenticated
:
return
redirect_to_login
(
request
.
get_full_path
(),
return
redirect_to_login
(
request
.
get_full_path
(),
self
.
get_login_url
(),
self
.
get_login_url
(),
self
.
get_redirect_field_name
())
self
.
get_redirect_field_name
())
...
...
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