From 39eb9c535bbc5f61d0ce2f8c8fa26509fa98a34d Mon Sep 17 00:00:00 2001
From: Nikita Manovich <40690625+nmanovic@users.noreply.github.com>
Date: Mon, 6 Apr 2020 15:58:55 +0300
Subject: [PATCH 1/5] Add pull request and issue templates (#1359)
* Add initial version of pull request template
* Fix links
* Fix codacy issues
* Slightly improve titles of sections
* Add a note about strikethough for the checklist.
* Fix progress of a pull request (each checkbox is an issue)
* Add the license header, checkboxes about the license.
* Updated the license
* Update the license to met https://github.com/licensee/licensee/blob/master/vendor/choosealicense.com/_licenses/mit.txt restrictions.
* Fix the pull request template name
* Make explaination text as comments (it will be visible when you edit the PR message)
* Add initial version of the issue template.
---
.github/ISSUE_TEMPLATE.md | 53 ++++++++++++++++++++++++++++++++
.github/PULL_REQUEST_TEMPLATE.md | 46 +++++++++++++++++++++++++++
LICENSE | 5 +--
3 files changed, 102 insertions(+), 2 deletions(-)
create mode 100644 .github/ISSUE_TEMPLATE.md
create mode 100644 .github/PULL_REQUEST_TEMPLATE.md
diff --git a/.github/ISSUE_TEMPLATE.md b/.github/ISSUE_TEMPLATE.md
new file mode 100644
index 000000000000..d9506af88420
--- /dev/null
+++ b/.github/ISSUE_TEMPLATE.md
@@ -0,0 +1,53 @@
+
+
+### My actions before raising this issue
+- [ ] Read/searched [the docs](https://github.com/opencv/cvat/tree/master#documentation)
+- [ ] Searched [past issues](/issues)
+
+
+
+### Expected Behaviour
+
+
+### Current Behaviour
+
+
+### Possible Solution
+
+
+### Steps to Reproduce (for bugs)
+
+1.
+1.
+1.
+1.
+
+### Context
+
+
+### Your Environment
+
+- Git hash commit (`git log -1`):
+- Docker version `docker version` (e.g. Docker 17.0.05):
+- Are you using Docker Swarm or Kubernetes?
+- Operating System and version (e.g. Linux, Windows, MacOS):
+- Code example or link to GitHub repo or gist to reproduce problem:
+- Other diagnostic information / logs:
+
+ Logs from `cvat` container
+
+
+### Next steps
+You may [join our Gitter](https://gitter.im/opencv-cvat/public) channel for community support.
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
new file mode 100644
index 000000000000..23b9bde82ca7
--- /dev/null
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -0,0 +1,46 @@
+
+
+
+
+### Motivation and context
+
+
+### How has this been tested?
+
+
+### Checklist
+
+
+- [ ] I have raised an issue to propose this change ([required](https://github.com/opencv/cvat/issues))
+- [ ] My issue has received approval from the maintainers
+- [ ] I've read the [CONTRIBUTION](https://github.com/opencv/cvat/blob/develop/CONTRIBUTING.md) guide
+- [ ] I have added description of my changes into [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file
+- [ ] I have updated the [documentation](
+ https://github.com/opencv/cvat/blob/develop/README.md#documentation) accordingly
+- [ ] I have added tests to cover my changes
+- [ ] I have linked related issues ([read github docs](
+ https://help.github.com/en/github/managing-your-work-on-github/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword))
+
+### License
+
+- [ ] I submit _my code changes_ under the same [MIT License](
+ https://github.com/opencv/cvat/blob/develop/LICENSE) that covers the project.
+ Feel free to contact the maintainers if that's a concern.
+- [ ] I have updated the license header for each file (see an example below)
+
+```python
+# Copyright (C) 2020 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+```
diff --git a/LICENSE b/LICENSE
index aae0a08ec7db..46056e4fd379 100644
--- a/LICENSE
+++ b/LICENSE
@@ -1,4 +1,6 @@
-Copyright (C) 2018 Intel Corporation
+MIT License
+
+Copyright (C) 2018-2020 Intel Corporation
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"),
@@ -18,4 +20,3 @@ OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE
OR OTHER DEALINGS IN THE SOFTWARE.
-SPDX-License-Identifier: MIT
From 034268e87dbf72b6ca08f017152b962882cc1d84 Mon Sep 17 00:00:00 2001
From: Nikita Manovich <40690625+nmanovic@users.noreply.github.com>
Date: Mon, 20 Apr 2020 10:47:36 +0300
Subject: [PATCH 2/5] Improve PR template (#1427)
* Simplified PR template.
* Remove a new line to make codacy happy.
---
.github/PULL_REQUEST_TEMPLATE.md | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index 23b9bde82ca7..f07c5f8cc3c6 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -4,6 +4,12 @@ Copyright (C) 2020 Intel Corporation
SPDX-License-Identifier: MIT
-->
+
+
### Motivation and context
@@ -21,10 +27,7 @@ see how your change affects other areas of the code, etc. -->
If an item isn't applicable by a reason then ~~explicitly strikethrough~~ the whole
line. If you don't do that github will show incorrect process for the pull request.
If you're unsure about any of these, don't hesitate to ask. We're here to help! -->
-
-- [ ] I have raised an issue to propose this change ([required](https://github.com/opencv/cvat/issues))
-- [ ] My issue has received approval from the maintainers
-- [ ] I've read the [CONTRIBUTION](https://github.com/opencv/cvat/blob/develop/CONTRIBUTING.md) guide
+- [ ] I submit my changes into the `develop` branch
- [ ] I have added description of my changes into [CHANGELOG](https://github.com/opencv/cvat/blob/develop/CHANGELOG.md) file
- [ ] I have updated the [documentation](
https://github.com/opencv/cvat/blob/develop/README.md#documentation) accordingly
From fb9991848b2d0fcda4815343eea8e92c08f4fab5 Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Thu, 28 May 2020 12:02:52 +0300
Subject: [PATCH 3/5] changed permission checking for the analytics view, used
OR instead AND for the group whitelist
---
cvat/apps/log_viewer/views.py | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/cvat/apps/log_viewer/views.py b/cvat/apps/log_viewer/views.py
index 9d1d2a0c3471..d4a6c21998e0 100644
--- a/cvat/apps/log_viewer/views.py
+++ b/cvat/apps/log_viewer/views.py
@@ -20,3 +20,8 @@ def get_request_headers(self):
headers['X-Forwarded-User'] = headers['REMOTE_USER']
return headers
+
+ # Returns True if the user has any of the specified permissions
+ def has_permission(self):
+ perms = self.get_permission_required()
+ return any(self.request.user.has_perm(perm) for perm in perms)
From d04dcc9c1e07090f9ebe326c75604a213f8c289a Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Thu, 28 May 2020 12:19:09 +0300
Subject: [PATCH 4/5] updated the license header and removed unused files
---
cvat/apps/log_viewer/admin.py | 3 ---
cvat/apps/log_viewer/models.py | 3 ---
cvat/apps/log_viewer/tests.py | 3 ---
cvat/apps/log_viewer/urls.py | 3 +--
cvat/apps/log_viewer/views.py | 4 ++++
5 files changed, 5 insertions(+), 11 deletions(-)
delete mode 100644 cvat/apps/log_viewer/admin.py
delete mode 100644 cvat/apps/log_viewer/models.py
delete mode 100644 cvat/apps/log_viewer/tests.py
diff --git a/cvat/apps/log_viewer/admin.py b/cvat/apps/log_viewer/admin.py
deleted file mode 100644
index 8c38f3f3dad5..000000000000
--- a/cvat/apps/log_viewer/admin.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.contrib import admin
-
-# Register your models here.
diff --git a/cvat/apps/log_viewer/models.py b/cvat/apps/log_viewer/models.py
deleted file mode 100644
index 71a836239075..000000000000
--- a/cvat/apps/log_viewer/models.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.db import models
-
-# Create your models here.
diff --git a/cvat/apps/log_viewer/tests.py b/cvat/apps/log_viewer/tests.py
deleted file mode 100644
index 7ce503c2dd97..000000000000
--- a/cvat/apps/log_viewer/tests.py
+++ /dev/null
@@ -1,3 +0,0 @@
-from django.test import TestCase
-
-# Create your tests here.
diff --git a/cvat/apps/log_viewer/urls.py b/cvat/apps/log_viewer/urls.py
index d8996c681a1e..eefad13066eb 100644
--- a/cvat/apps/log_viewer/urls.py
+++ b/cvat/apps/log_viewer/urls.py
@@ -1,5 +1,5 @@
-# Copyright (C) 2018 Intel Corporation
+# Copyright (C) 2018-2020 Intel Corporation
#
# SPDX-License-Identifier: MIT
@@ -9,4 +9,3 @@
urlpatterns = [
path('', views.LogViewerProxy.as_view())
]
-
diff --git a/cvat/apps/log_viewer/views.py b/cvat/apps/log_viewer/views.py
index d4a6c21998e0..6718a18a5370 100644
--- a/cvat/apps/log_viewer/views.py
+++ b/cvat/apps/log_viewer/views.py
@@ -1,3 +1,7 @@
+# Copyright (C) 2018-2020 Intel Corporation
+#
+# SPDX-License-Identifier: MIT
+
import os
from revproxy.views import ProxyView
From 0ae74f5ba718898fa9f4d8823a2ba2670be0cb2c Mon Sep 17 00:00:00 2001
From: Andrey Zhavoronkov
Date: Thu, 28 May 2020 12:39:52 +0300
Subject: [PATCH 5/5] updated changelog
---
CHANGELOG.md | 1 +
1 file changed, 1 insertion(+)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3945039c3526..12424f8ed30b 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -56,6 +56,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- Synchronization with remote git repo ()
- A problem with mask to polygons conversion when polygons are too small ()
- Unable to upload video with uneven size ()
+- Permission group whitelist check for analytics view ()
### Security
-