Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

release: moving changes from preview to master #3175

Merged
merged 61 commits into from
Dec 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
63a15f2
chore: calendar layout day tile improvement
anmolsinghbhatia Dec 13, 2023
644073f
chore: issue detail page title and indicator improvement
anmolsinghbhatia Dec 13, 2023
29a0ba4
chore: sub issue propery permission validation
anmolsinghbhatia Dec 13, 2023
a0588be
chore: remove parent option added in issue sidebar and peek overview
anmolsinghbhatia Dec 13, 2023
e8945f2
chore: remove parent option added in issue sidebar and peek overview
anmolsinghbhatia Dec 13, 2023
0f892d4
chore: analytics permission validation added
anmolsinghbhatia Dec 13, 2023
13d7832
chore: app sidebar quick action permission validation added
anmolsinghbhatia Dec 13, 2023
dadd2cf
Fix .vertical-lr in Firefox
notpushkin Dec 13, 2023
f949d57
Merge pull request #3119 from makeplane/chore/analytics_permission_va…
sriramveeraghanta Dec 13, 2023
239f68e
Merge pull request #3117 from makeplane/chore/issue_related_bug_and_i…
sriramveeraghanta Dec 13, 2023
ee68c3a
Merge pull request #3111 from makeplane/chore/calendar_layout_improve…
sriramveeraghanta Dec 13, 2023
b78e83d
chore: image file update, icon consistency, bug fixes and code refact…
anmolsinghbhatia Dec 13, 2023
fe80ca3
chore: issue sidebar and project view improvement and validation (#3098)
anmolsinghbhatia Dec 13, 2023
b4f51cb
chore: cycle and module sidebar permission validation (#3095)
anmolsinghbhatia Dec 13, 2023
2605b93
chore: empty state action button validation (#3094)
anmolsinghbhatia Dec 13, 2023
6c61fbd
chore: guest user profile access-related problem (#3089)
anmolsinghbhatia Dec 13, 2023
4bb99d5
fix: cycle delete & active cycle loading (#3088)
1akhanBaheti Dec 13, 2023
9d0056c
fix: spreadsheet layout sub-issues property update (#3110)
1akhanBaheti Dec 13, 2023
6004f29
Fix: update self-host docs link in README (#3109)
ehteshamdev0 Dec 13, 2023
910d1a1
Merge branch 'preview' of github.com:makeplane/plane into develop
sriramveeraghanta Dec 13, 2023
8d3a0a2
fix: build error (#3128)
anmolsinghbhatia Dec 14, 2023
78b29eb
chore: resolved the use tls error (#3114)
NarayanBavisetti Dec 14, 2023
f1ed0c9
chore: workspace project reinvite (#3112)
NarayanBavisetti Dec 14, 2023
1f8ae3a
chore: project member list (#3087)
NarayanBavisetti Dec 14, 2023
5c7382d
fix: environment file missing for space (#3105)
pablohashescobar Dec 14, 2023
1c546e3
fix: cycle & module sidebar date range picker (#3127)
1akhanBaheti Dec 14, 2023
3adf48e
chore: `add new or existing issues` validation for guest & viewers in…
prateekshourya29 Dec 14, 2023
aafac9e
chore: state sequence ordering (#3130)
anmolsinghbhatia Dec 14, 2023
4e2bf24
chore: filter edit operation in views is disabled for lower roles (#3…
1akhanBaheti Dec 14, 2023
7684a2c
chore: sidebar quick action improvement (#3133)
anmolsinghbhatia Dec 14, 2023
5b67f27
fix: remove get requests from the catch block (#3135)
aaryan610 Dec 14, 2023
2edd2d9
chore: implement validation for accepting 'http://' and 'https://' ur…
anmolsinghbhatia Dec 15, 2023
829c08f
fix: making changes to sync job (#3149)
sriramveeraghanta Dec 15, 2023
ecfcc03
fix: removing unneccessary checks (#3150)
sriramveeraghanta Dec 15, 2023
08425c9
fix: sync changes (#3151)
sriramveeraghanta Dec 15, 2023
74b141e
fix: sync changes (#3152)
sriramveeraghanta Dec 15, 2023
ce9714f
fix: sync pr changes (#3153)
sriramveeraghanta Dec 15, 2023
885de6f
fix: sync changes (#3154)
sriramveeraghanta Dec 15, 2023
b7e2f1e
chore: resolve priority sorting order (#3141)
anmolsinghbhatia Dec 15, 2023
f03a9a6
fix: sync changes (#3156)
sriramveeraghanta Dec 15, 2023
e590215
fix: overflow issues in the profile settings layout (#3163)
aaryan610 Dec 16, 2023
d473ba9
fix: create issue project ID (#3131)
1akhanBaheti Dec 16, 2023
3d83101
fix: issue with `cycle` and `module` sidebar filter implementation. (…
prateekshourya29 Dec 16, 2023
8a1a6c6
chore: disable API calls for un-authorized users (#3144)
aaryan610 Dec 16, 2023
31fdaf2
fix: project members fetch fix (#3145)
anmolsinghbhatia Dec 16, 2023
e1793dd
chore: role restriction to issue detail & peek-overview (#3146)
1akhanBaheti Dec 16, 2023
a37dec4
chore: made project-identifier rule consistent (#3148)
1akhanBaheti Dec 16, 2023
849bc92
Merge pull request #3121 from notpushkin/patch-1
sriramveeraghanta Dec 17, 2023
969a51f
chore: issue click & peek overview improvement (#3157)
anmolsinghbhatia Dec 18, 2023
05e7afa
fix: issue peek-overview delete functionality (#3134)
1akhanBaheti Dec 18, 2023
e40f38e
fix: typo in install.sh (#3136)
eltociear Dec 18, 2023
b7a0f3c
fix: project cover list endpoint (#3168)
pablohashescobar Dec 18, 2023
184db01
User role validation across workspace and projects. (#3167)
prateekshourya29 Dec 18, 2023
0ee6c20
chore(deps): bump cryptography in /apiserver/requirements (#3166)
dependabot[bot] Dec 18, 2023
18c86bd
chore: add `email from address` in Instance Admin Email Settings. (#3…
prateekshourya29 Dec 18, 2023
37df0bc
fix: issue with peek view properties not editable and options not bei…
prateekshourya29 Dec 18, 2023
c9792da
fix: bug fixes & improvements (#3159)
1akhanBaheti Dec 18, 2023
81256d6
chore: add tooltips to issue properties with no value (#3169)
aaryan610 Dec 18, 2023
a86dafc
Merge pull request #3170 from makeplane/preview
sriramveeraghanta Dec 18, 2023
6f2cce0
Merge pull request #3171 from makeplane/develop
sriramveeraghanta Dec 18, 2023
7bff8d2
chore: cycle and module sidebar mutation fix (#3174)
anmolsinghbhatia Dec 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
51 changes: 9 additions & 42 deletions .github/workflows/create-sync-pr.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
name: Create PR in Plane EE Repository to sync the changes
name: Create Sync Action

on:
pull_request:
branches:
- master
- preview
types:
- closed
env:
SOURCE_BRANCH_NAME: ${{github.event.pull_request.base.ref}}

jobs:
create_pr:
Expand All @@ -16,27 +18,13 @@ jobs:
pull-requests: write
contents: read
steps:
- name: Check SOURCE_REPO
id: check_repo
env:
SOURCE_REPO: ${{ secrets.SOURCE_REPO_NAME }}
run: |
echo "::set-output name=is_correct_repo::$(if [[ "$SOURCE_REPO" == "makeplane/plane" ]]; then echo 'true'; else echo 'false'; fi)"

- name: Checkout Code
if: steps.check_repo.outputs.is_correct_repo == 'true'
uses: actions/checkout@v2
with:
persist-credentials: false
fetch-depth: 0

- name: Set up Branch Name
if: steps.check_repo.outputs.is_correct_repo == 'true'
run: |
echo "SOURCE_BRANCH_NAME=${{ github.head_ref }}" >> $GITHUB_ENV

- name: Setup GH CLI
if: steps.check_repo.outputs.is_correct_repo == 'true'
run: |
type -p curl >/dev/null || (sudo apt update && sudo apt install curl -y)
curl -fsSL https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo dd of=/usr/share/keyrings/githubcli-archive-keyring.gpg
Expand All @@ -45,35 +33,14 @@ jobs:
sudo apt update
sudo apt install gh -y

- name: Create Pull Request
if: steps.check_repo.outputs.is_correct_repo == 'true'
- name: Push Changes to Target Repo
env:
GH_TOKEN: ${{ secrets.ACCESS_TOKEN }}
run: |
TARGET_REPO="${{ secrets.TARGET_REPO_NAME }}"
TARGET_BRANCH="${{ secrets.TARGET_REPO_BRANCH }}"
TARGET_REPO="${{ secrets.SYNC_TARGET_REPO_NAME }}"
TARGET_BRANCH="${{ secrets.SYNC_TARGET_BRANCH_NAME }}"
SOURCE_BRANCH="${{ env.SOURCE_BRANCH_NAME }}"

git checkout $SOURCE_BRANCH
git remote add target "https://[email protected]/$TARGET_REPO.git"
git push target $SOURCE_BRANCH:$SOURCE_BRANCH

PR_TITLE="${{ github.event.pull_request.title }}"
PR_BODY="${{ github.event.pull_request.body }}"

# Remove double quotes
PR_TITLE_CLEANED="${PR_TITLE//\"/}"
PR_BODY_CLEANED="${PR_BODY//\"/}"

# Construct PR_BODY_CONTENT using a here-document
PR_BODY_CONTENT=$(cat <<EOF
$PR_BODY_CLEANED
EOF
)

gh pr create \
--base $TARGET_BRANCH \
--head $SOURCE_BRANCH \
--title "[SYNC] $PR_TITLE_CLEANED" \
--body "$PR_BODY_CONTENT" \
--repo $TARGET_REPO
git remote add target-origin "https://[email protected]/$TARGET_REPO.git"
git push target-origin $SOURCE_BRANCH:$TARGET_BRANCH
29 changes: 4 additions & 25 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ The backend is a django project which is kept inside apiserver
1. Clone the repo

```bash
git clone https://github.com/makeplane/plane
cd plane
git clone https://github.com/makeplane/plane.git [folder-name]
cd [folder-name]
chmod +x setup.sh
```

Expand All @@ -44,33 +44,12 @@ chmod +x setup.sh
./setup.sh
```

3. Define `NEXT_PUBLIC_API_BASE_URL=http://localhost` in **web/.env** and **space/.env** file
3. Start the containers

```bash
echo "\nNEXT_PUBLIC_API_BASE_URL=http://localhost\n" >> ./web/.env
docker compose -f docker-compose-local.yml up
```

```bash
echo "\nNEXT_PUBLIC_API_BASE_URL=http://localhost\n" >> ./space/.env
```

4. Run Docker compose up

```bash
docker compose up -d
```

5. Install dependencies

```bash
yarn install
```

6. Run the web app in development mode

```bash
yarn dev
```

## Missing a Feature?

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Meet [Plane](https://plane.so). An open-source software development tool to mana

> Plane is still in its early days, not everything will be perfect yet, and hiccups may happen. Please let us know of any suggestions, ideas, or bugs that you encounter on our [Discord](https://discord.com/invite/A92xrEGCge) or GitHub issues, and we will use your feedback to improve on our upcoming releases.

The easiest way to get started with Plane is by creating a [Plane Cloud](https://app.plane.so) account. Plane Cloud offers a hosted solution for Plane. If you prefer to self-host Plane, please refer to our [deployment documentation](https://docs.plane.so/self-hosting).
The easiest way to get started with Plane is by creating a [Plane Cloud](https://app.plane.so) account. Plane Cloud offers a hosted solution for Plane. If you prefer to self-host Plane, please refer to our [deployment documentation](https://docs.plane.so/self-hosting/docker-compose).

## ⚡️ Contributors Quick Start

Expand All @@ -63,7 +63,7 @@ Thats it!

## 🍙 Self Hosting

For self hosting environment setup, visit the [Self Hosting](https://docs.plane.so/self-hosting) documentation page
For self hosting environment setup, visit the [Self Hosting](https://docs.plane.so/self-hosting/docker-compose) documentation page

## 🚀 Features

Expand Down
2 changes: 1 addition & 1 deletion apiserver/Dockerfile.dev
Original file line number Diff line number Diff line change
Expand Up @@ -49,5 +49,5 @@ USER captain
# Expose container port and run entry point script
EXPOSE 8000

# CMD [ "./bin/takeoff" ]
CMD [ "./bin/takeoff.local" ]

31 changes: 31 additions & 0 deletions apiserver/bin/takeoff.local
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/bin/bash
set -e
python manage.py wait_for_db
python manage.py migrate

# Create the default bucket
#!/bin/bash

# Collect system information
HOSTNAME=$(hostname)
MAC_ADDRESS=$(ip link show | awk '/ether/ {print $2}' | head -n 1)
CPU_INFO=$(cat /proc/cpuinfo)
MEMORY_INFO=$(free -h)
DISK_INFO=$(df -h)

# Concatenate information and compute SHA-256 hash
SIGNATURE=$(echo "$HOSTNAME$MAC_ADDRESS$CPU_INFO$MEMORY_INFO$DISK_INFO" | sha256sum | awk '{print $1}')

# Export the variables
export MACHINE_SIGNATURE=$SIGNATURE

# Register instance
python manage.py register_instance $MACHINE_SIGNATURE
# Load the configuration variable
python manage.py configure_instance

# Create the default bucket
python manage.py create_bucket

python manage.py runserver 0.0.0.0:8000 --settings=plane.settings.local

72 changes: 54 additions & 18 deletions apiserver/plane/app/views/project.py
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,16 @@ def get_queryset(self):
)
)
)
.prefetch_related(
Prefetch(
"project_projectmember",
queryset=ProjectMember.objects.filter(
workspace__slug=self.kwargs.get("slug"),
is_active=True,
).select_related("member"),
to_attr="members_list",
)
)
.distinct()
)

Expand All @@ -160,16 +170,6 @@ def list(self, request, slug):
projects = (
self.get_queryset()
.annotate(sort_order=Subquery(sort_order_query))
.prefetch_related(
Prefetch(
"project_projectmember",
queryset=ProjectMember.objects.filter(
workspace__slug=slug,
is_active=True,
).select_related("member"),
to_attr="members_list",
)
)
.order_by("sort_order", "name")
)
if request.GET.get("per_page", False) and request.GET.get("cursor", False):
Expand Down Expand Up @@ -679,6 +679,25 @@ def create(self, request, slug, project_id):
)
)

# Check if the user is already a member of the project and is inactive
if ProjectMember.objects.filter(
workspace__slug=slug,
project_id=project_id,
member_id=member.get("member_id"),
is_active=False,
).exists():
member_detail = ProjectMember.objects.get(
workspace__slug=slug,
project_id=project_id,
member_id=member.get("member_id"),
is_active=False,
)
# Check if the user has not deactivated the account
user = User.objects.filter(pk=member.get("member_id")).first()
if user.is_active:
member_detail.is_active = True
member_detail.save(update_fields=["is_active"])

project_members = ProjectMember.objects.bulk_create(
bulk_project_members,
batch_size=10,
Expand Down Expand Up @@ -991,11 +1010,18 @@ class ProjectPublicCoverImagesEndpoint(BaseAPIView):

def get(self, request):
files = []
s3 = boto3.client(
"s3",
aws_access_key_id=settings.AWS_ACCESS_KEY_ID,
aws_secret_access_key=settings.AWS_SECRET_ACCESS_KEY,
)
s3_client_params = {
"service_name": "s3",
"aws_access_key_id": settings.AWS_ACCESS_KEY_ID,
"aws_secret_access_key": settings.AWS_SECRET_ACCESS_KEY,
}

# Use AWS_S3_ENDPOINT_URL if it is present in the settings
if hasattr(settings, "AWS_S3_ENDPOINT_URL") and settings.AWS_S3_ENDPOINT_URL:
s3_client_params["endpoint_url"] = settings.AWS_S3_ENDPOINT_URL

s3 = boto3.client(**s3_client_params)

params = {
"Bucket": settings.AWS_STORAGE_BUCKET_NAME,
"Prefix": "static/project-cover/",
Expand All @@ -1008,9 +1034,19 @@ def get(self, request):
if not content["Key"].endswith(
"/"
): # This line ensures we're only getting files, not "sub-folders"
files.append(
f"https://{settings.AWS_STORAGE_BUCKET_NAME}.s3.{settings.AWS_REGION}.amazonaws.com/{content['Key']}"
)
if (
hasattr(settings, "AWS_S3_CUSTOM_DOMAIN")
and settings.AWS_S3_CUSTOM_DOMAIN
and hasattr(settings, "AWS_S3_URL_PROTOCOL")
and settings.AWS_S3_URL_PROTOCOL
):
files.append(
f"{settings.AWS_S3_URL_PROTOCOL}//{settings.AWS_S3_CUSTOM_DOMAIN}/{content['Key']}"
)
else:
files.append(
f"https://{settings.AWS_STORAGE_BUCKET_NAME}.s3.{settings.AWS_REGION}.amazonaws.com/{content['Key']}"
)

return Response(files, status=status.HTTP_200_OK)

Expand Down
13 changes: 13 additions & 0 deletions apiserver/plane/app/views/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@
WorkSpaceAdminPermission,
WorkspaceEntityPermission,
WorkspaceViewerPermission,
WorkspaceUserPermission,
)
from plane.bgtasks.workspace_invitation_task import workspace_invitation
from plane.utils.issue_filters import issue_filters
Expand Down Expand Up @@ -495,6 +496,18 @@ class WorkSpaceMemberViewSet(BaseViewSet):
WorkspaceEntityPermission,
]

def get_permissions(self):
if self.action == "leave":
self.permission_classes = [
WorkspaceUserPermission,
]
else:
self.permission_classes = [
WorkspaceEntityPermission,
]

return super(WorkSpaceMemberViewSet, self).get_permissions()

search_fields = [
"member__display_name",
"member__first_name",
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/analytic_plot_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def send_export_email(email, slug, csv_buffer, rows):
port=int(EMAIL_PORT),
username=EMAIL_HOST_USER,
password=EMAIL_HOST_PASSWORD,
use_tls=bool(EMAIL_USE_TLS),
use_tls=EMAIL_USE_TLS == "1",
)

msg = EmailMultiAlternatives(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/forgot_password_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def forgot_password(first_name, email, uidb64, token, current_site):
port=int(EMAIL_PORT),
username=EMAIL_HOST_USER,
password=EMAIL_HOST_PASSWORD,
use_tls=bool(EMAIL_USE_TLS),
use_tls=EMAIL_USE_TLS == "1",
)

msg = EmailMultiAlternatives(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/magic_link_code_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def magic_link(email, key, token, current_site):
port=int(EMAIL_PORT),
username=EMAIL_HOST_USER,
password=EMAIL_HOST_PASSWORD,
use_tls=bool(EMAIL_USE_TLS),
use_tls=EMAIL_USE_TLS == "1",
)

msg = EmailMultiAlternatives(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/project_invitation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def project_invitation(email, project_id, token, current_site, invitor):
port=int(EMAIL_PORT),
username=EMAIL_HOST_USER,
password=EMAIL_HOST_PASSWORD,
use_tls=bool(EMAIL_USE_TLS),
use_tls=EMAIL_USE_TLS == "1",
)

msg = EmailMultiAlternatives(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/plane/bgtasks/workspace_invitation_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ def workspace_invitation(email, workspace_id, token, current_site, invitor):
port=int(EMAIL_PORT),
username=EMAIL_HOST_USER,
password=EMAIL_HOST_PASSWORD,
use_tls=bool(EMAIL_USE_TLS),
use_tls=EMAIL_USE_TLS == "1",
)

msg = EmailMultiAlternatives(
Expand Down
2 changes: 1 addition & 1 deletion apiserver/requirements/base.txt
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ openpyxl==3.1.2
beautifulsoup4==4.12.2
dj-database-url==2.1.0
posthog==3.0.2
cryptography==41.0.5
cryptography==41.0.6
lxml==4.9.3
boto3==1.28.40

2 changes: 1 addition & 1 deletion deploy/selfhost/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ function download(){
echo ""
echo "Latest version is now available for you to use"
echo ""
echo "In case of Upgrade, your new setting file is availabe as 'variables-upgrade.env'. Please compare and set the required values in '.env 'file."
echo "In case of Upgrade, your new setting file is available as 'variables-upgrade.env'. Please compare and set the required values in '.env 'file."
echo ""

}
Expand Down
Loading
Loading