Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
Gutyán Gábor
/
circlestack
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
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
Commit
e6a26476
authored
Jun 25, 2014
by
Kálmán Viktor
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dashboard: don't be merge activites with different user
parent
a95515ec
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
1 deletions
+2
-1
circle/dashboard/views.py
+1
-1
circle/vm/models/instance.py
+1
-0
No files found.
circle/dashboard/views.py
View file @
e6a26476
...
...
@@ -2092,7 +2092,7 @@ class LeaseDelete(LoginRequiredMixin, SuperuserRequiredMixin, DeleteView):
@require_GET
def
vm_activity
(
request
,
pk
):
instance
=
Instance
.
objects
.
get
(
pk
=
pk
)
if
not
instance
.
has_level
(
request
.
user
,
'
own
er'
):
if
not
instance
.
has_level
(
request
.
user
,
'
us
er'
):
raise
PermissionDenied
()
response
=
{}
...
...
circle/vm/models/instance.py
View file @
e6a26476
...
...
@@ -937,6 +937,7 @@ class Instance(AclBase, VirtualMachineDescModel, StatusModel, OperatedMixin,
if
(
latest
==
a
.
activity_code
and
merged_acts
[
-
1
]
.
result
==
a
.
result
and
a
.
finished
and
merged_acts
[
-
1
]
.
finished
and
a
.
user
==
merged_acts
[
-
1
]
.
user
and
(
merged_acts
[
-
1
]
.
finished
-
a
.
finished
)
.
days
<
7
and
not
a
.
activity_code
.
endswith
(
whitelist
)):
merged_acts
[
-
1
]
.
times
+=
1
...
...
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