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

Prep for editing user expiration #424

Closed
wants to merge 37 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
9b784a2
wizarr-sentry[bot] May 3, 2024
8a82a78
chore: 🧽 Updated the unraid template to include different branches
JamsRepos May 3, 2024
e956c28
chore: 🧼 Exclude language filles from the workspace search
JamsRepos May 3, 2024
08840b9
chore: 🧺 Exclude unraid template from triggering semantic releases
JamsRepos May 3, 2024
b605010
fix: 🚑 Corrected the variable for unlimited invite uses on plex
JamsRepos May 3, 2024
3e52988
chore: 🧼 Corrected branch of the latest image
JamsRepos May 3, 2024
affa9ff
fix: 🐛 Fix migration syntax error
JamsRepos May 3, 2024
a075079
fix: 🩹 Removed plex home configuration due to not existing in the Ple…
JamsRepos May 3, 2024
71cd75a
fix: 🐝 Viewing managed users now works if media override is the Plex …
JamsRepos May 3, 2024
7eaf403
fix: 🩹 Re-write plex.tv URL's to app.plex.tv on media server override
JamsRepos May 3, 2024
78665f6
Revert "fix: 🐝 Viewing managed users now works if media override is t…
JamsRepos May 3, 2024
2bd8fe9
Merge pull request #406 from wizarrrr/chore/general-maintenance
JamsRepos May 3, 2024
05b3931
ci(semantic-release): auto-sync commit message
MrDynamo May 4, 2024
9235de4
ci(semantic-release): update sync commit msg
MrDynamo May 4, 2024
819223e
fix: 🐛 Beta message no longer shows on main releases
JamsRepos May 4, 2024
82d4cf5
perf: 🚀API Endpoint Optimisation (#409)
JamsRepos May 5, 2024
c913942
chore: 🧽 Fixed formatting with sematic release commit names
JamsRepos May 5, 2024
0e36e02
wizarr-sentry[bot] May 5, 2024
8f18d98
refactor: 📦 Update Available toasts no longer appear for non-admins
JamsRepos May 5, 2024
44fe2f1
perf: 🚀 Only update Emby/Jellyfin users when data is different
JamsRepos May 5, 2024
01c1cfd
Merge pull request #407 from wizarrrr/develop
JamsRepos May 6, 2024
0058a5b
chore(release): 4.1.1-beta.1
semantic-release-bot May 6, 2024
3e213b1
chore: 🧽 sync develop with beta
wizarr-sentry[bot] May 6, 2024
97a5fd4
ci(deps): setup dependabot updates (#413)
MrDynamo May 9, 2024
ec0c1ee
ci: setup auto pr reviews (#415)
MrDynamo May 9, 2024
e6008a6
ci(pr-review): 🔧 scope to pr target only
MrDynamo May 9, 2024
37612b5
ci(codeql): setup code vulnerability scanning (#417)
MrDynamo May 9, 2024
1d02e62
Removed version tag from docker-compose
mtthidoteu May 16, 2024
6108b6f
Merge pull request #422 from wizarrrr/mtthidoteu-patch-1
mtthidoteu May 16, 2024
ba5ffcb
Merge pull request #420 from wizarrrr/develop
JamsRepos May 19, 2024
e90d092
chore(release): 4.1.1-beta.2
semantic-release-bot May 19, 2024
7107159
chore: 🧽 sync develop with beta
wizarr-sentry[bot] May 19, 2024
462deae
fix: 🚑 Plex API endpoint for deleting users
JamsRepos May 19, 2024
16c90f7
Merge pull request #423 from wizarrrr/develop
JamsRepos May 19, 2024
a37aa0e
chore(release): 4.1.1-beta.3
semantic-release-bot May 19, 2024
1a263de
chore: 🧽 sync develop with beta
wizarr-sentry[bot] May 19, 2024
018ec31
prep for allowing editing of existing users #414
mtthidoteu May 20, 2024
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
46 changes: 46 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# Basic `dependabot.yml` file with
# minimum configuration for two package managers

version: 2
updates:
# Enable version updates for npm project
- package-ecosystem: "npm"
# Look for `package.json` and `lock` files in the `root` directory
directory: "/"
# Check the npm registry for updates every day (weekdays)
schedule:
interval: "daily"
# NOTE: Removed reviewers as the pr-review-request workflow will accomplish the same thing on all PR types.
# reviewers:
# - JamsRepos
# - PhantomMantis
# - MrDynamo
target-branch: "develop"

# Enable version updates for poetry backend
- package-ecosystem: "pip"
# Look for `pyproject.toml` and `lock` files in the `backend` directory
directory: "/apps/wizarr_backend/"
# Check the pip registry for updates every day (weekdays)
schedule:
interval: "daily"
# NOTE: Removed reviewers as the pr-review-request workflow will accomplish the same thing on all PR types.
# reviewers:
# - JamsRepos
# - PhantomMantis
# - MrDynamo
target-branch: "develop"

# Enable version updates for github actions
- package-ecosystem: "github-actions"
# Defaults to .github/workflows directory
directory: "/"
# Check the actions registry for updates every day (weekdays)
schedule:
interval: "daily"
# NOTE: Removed reviewers as the pr-review-request workflow will accomplish the same thing on all PR types.
# reviewers:
# - JamsRepos
# - PhantomMantis
# - MrDynamo
target-branch: "develop"
32 changes: 32 additions & 0 deletions .github/pr-review-config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
reviewers:

# Default reviewers
defaults:
- JamsRepos
- PhantomMantis
- MrDynamo

# Group definitions
groups:
maintainers:
- JamsRepos
- PhantomMantis
- MrDynamo
# contributors:
# #Additional users to review can go here

# per_author:
# contributors:
# - maintainers

options:
ignore_draft: true
ignored_keywords:
- NO REVIEW


######
#
# https://github.com/marketplace/actions/auto-request-review
#
######
1 change: 1 addition & 0 deletions .github/workflows/build-storybook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ on:
- "**/latest"
- "**/CHANGELOG.md"
- "**/CHANGELOG-beta.md"
- "**/unraid.xml"
- "./scripts/**"
- "./release.config.cjs"

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/pr-review-request.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Auto Request PR Review

on:
pull_request_target:
types: [opened, ready_for_review, reopened]

jobs:
auto-request-review:
name: Request Reviews on Pull Request
runs-on: ubuntu-latest
steps:
- name: Get GitHub App Token
id: gh_app
uses: getsentry/action-github-app-token@v2
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Request reviewe
uses: necojackarc/[email protected]
with:
token: ${{ steps.gh_app.outputs.token }}
config: .github/pr-review-config.yml # Config file location override
# Look for config locally during run instead of in repo.
# For instance, if you'd like to use a config file stored in external storage,
# you can fetch it before you run this action, then let this action pick it up with `use_local: true`.
# This defaults to false if not specified.
# See https://github.com/necojackarc/auto-request-review/issues/76 for more details.
#use_local: true
4 changes: 3 additions & 1 deletion .github/workflows/semantic-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ on:
- "**/latest"
- "**/CHANGELOG.md"
- "**/CHANGELOG-beta.md"
- "**/unraid.xml"
- "./scripts/**"
- "./release.config.cjs"
workflow_dispatch: {}
Expand Down Expand Up @@ -93,4 +94,5 @@ jobs:
type: now
github_token: ${{ steps.gh_app.outputs.token }}
from_branch: ${{ github.ref_name }}
target_branch: develop
target_branch: develop
message: "chore: 🧽 sync develop with ${{ github.ref_name }}"
96 changes: 96 additions & 0 deletions .github/workflows/vulnerability-scan.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
#
# ******** NOTE ********
# We have attempted to detect the languages in your repository. Please check
# the `language` matrix defined below to confirm you have the correct set of
# supported CodeQL languages.
#
name: "CodeQL Vulnerability Scan"

on:
push:
branches:
- develop
pull_request_target:
branches:
- develop
schedule:
- cron: '28 7 * * 2'

jobs:
analyze:
name: Analyze (${{ matrix.language }})
# Runner size impacts CodeQL analysis time. To learn more, please see:
# - https://gh.io/recommended-hardware-resources-for-running-codeql
# - https://gh.io/supported-runners-and-hardware-resources
# - https://gh.io/using-larger-runners (GitHub.com only)
# Consider using larger runners or machines with greater resources for possible analysis time improvements.
runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}
timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }}
permissions:
# required for all workflows
security-events: write

# required to fetch internal or private CodeQL packs
packages: read

# only required for workflows in private repositories
actions: read
contents: read

strategy:
fail-fast: false
matrix:
include:
- language: javascript-typescript
build-mode: none
- language: python
build-mode: none
# CodeQL supports the following values keywords for 'language': 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift'
# Use `c-cpp` to analyze code written in C, C++ or both
# Use 'java-kotlin' to analyze code written in Java, Kotlin or both
# Use 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both
# To learn more about changing the languages that are analyzed or customizing the build mode for your analysis,
# see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/customizing-your-advanced-setup-for-code-scanning.
# If you are analyzing a compiled language, you can modify the 'build-mode' for that language to customize how
# your codebase is analyzed, see https://docs.github.com/en/code-security/code-scanning/creating-an-advanced-setup-for-code-scanning/codeql-code-scanning-for-compiled-languages
steps:
- name: Checkout repository
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }}
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality

# If the analyze step fails for one of the languages you are analyzing with
# "We were unable to automatically build your code", modify the matrix above
# to set the build mode to "manual" for that language. Then modify this step
# to build your code.
# ℹ️ Command-line programs to run using the OS shell.
# 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun
- if: matrix.build-mode == 'manual'
run: |
echo 'If you are using a "manual" build mode for one or more of the' \
'languages you are analyzing, replace this with the commands to build' \
'your code, for example:'
echo ' make bootstrap'
echo ' make release'
exit 1

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
with:
category: "/language:${{matrix.language}}"
64 changes: 64 additions & 0 deletions CHANGELOG-beta.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,67 @@
## [4.1.1-beta.3](https://github.com/wizarrrr/wizarr/compare/v4.1.1-beta.2...v4.1.1-beta.3) (2024-05-19)


### Bug Fixes

* 🚑 Plex API endpoint for deleting users ([462deae](https://github.com/wizarrrr/wizarr/commit/462deae0f8d3e3c77a8d33f43382abeba8dfa218))


### Chores

* 🧽 sync develop with beta ([7107159](https://github.com/wizarrrr/wizarr/commit/7107159ce9bfa8e54952696a53abc37a3f2ba13a))

## [4.1.1-beta.2](https://github.com/wizarrrr/wizarr/compare/v4.1.1-beta.1...v4.1.1-beta.2) (2024-05-19)


### Continuous Integration

* **codeql:** setup code vulnerability scanning ([#417](https://github.com/wizarrrr/wizarr/issues/417)) ([37612b5](https://github.com/wizarrrr/wizarr/commit/37612b527084a2e7c1074cc5699bb0e8434b6a30))
* **deps:** setup dependabot updates ([#413](https://github.com/wizarrrr/wizarr/issues/413)) ([97a5fd4](https://github.com/wizarrrr/wizarr/commit/97a5fd42727bb879c1fc391e9ff46723c3a9ce34))
* **pr-review:** 🔧 scope to pr target only ([e6008a6](https://github.com/wizarrrr/wizarr/commit/e6008a65d840872c0066443190043307fe2f5d92))
* setup auto pr reviews ([#415](https://github.com/wizarrrr/wizarr/issues/415)) ([ec0c1ee](https://github.com/wizarrrr/wizarr/commit/ec0c1ee91687a942a7ac54a731b84fc43cb9c9d1))


### Chores

* 🧽 sync develop with beta ([3e213b1](https://github.com/wizarrrr/wizarr/commit/3e213b1920ee56e7915acc69ce1192f2fc0ae278))

## [4.1.1-beta.1](https://github.com/wizarrrr/wizarr/compare/v4.1.0...v4.1.1-beta.1) (2024-05-06)


### Bug Fixes

* 🐛 Beta message no longer shows on main releases ([819223e](https://github.com/wizarrrr/wizarr/commit/819223e0b7dd419926946667c5e83837ef586052))
* 🐛 Fix migration syntax error ([affa9ff](https://github.com/wizarrrr/wizarr/commit/affa9ffe130f4100df61d2cf93a061a3f523be70))
* 🩹 Re-write plex.tv URL's to app.plex.tv on media server override ([7eaf403](https://github.com/wizarrrr/wizarr/commit/7eaf403044b0563ccfe5423b9ca262ba526750e9))
* 🩹 Removed plex home configuration due to not existing in the Plex API ([a075079](https://github.com/wizarrrr/wizarr/commit/a07507929a8c747787577015693eefeffc8ce658))
* 🚑 Corrected the variable for unlimited invite uses on plex ([b605010](https://github.com/wizarrrr/wizarr/commit/b605010b371bfd754f7b5406fe7aec74c0337adb))


### Performance Improvements

* 🚀 Only update Emby/Jellyfin users when data is different ([44fe2f1](https://github.com/wizarrrr/wizarr/commit/44fe2f1c2a3dd583fb4daa8c2563167f6b34a459))
* 🚀API Endpoint Optimisation ([#409](https://github.com/wizarrrr/wizarr/issues/409)) ([82d4cf5](https://github.com/wizarrrr/wizarr/commit/82d4cf5b4ffbb08669bfe955cb833a3d4c65756b))


### Continuous Integration

* **semantic-release:** auto-sync commit message ([05b3931](https://github.com/wizarrrr/wizarr/commit/05b3931de119ae27c625bbdb7871cab63d5abe0d))
* **semantic-release:** update sync commit msg ([9235de4](https://github.com/wizarrrr/wizarr/commit/9235de4095dfde158f8f52376ea0fc4fc7abd06f))


### Chores

* 🧺 Exclude unraid template from triggering semantic releases ([08840b9](https://github.com/wizarrrr/wizarr/commit/08840b9056e32649ab943ec473b3b71e6c8ed7d8))
* 🧼 Corrected branch of the latest image ([3e52988](https://github.com/wizarrrr/wizarr/commit/3e5298879b794df30d91a13bf53fa78a2fee6fd1))
* 🧼 Exclude language filles from the workspace search ([e956c28](https://github.com/wizarrrr/wizarr/commit/e956c2838c4b76f601cc4b21cbe03802a3da32a8))
* 🧽 Fixed formatting with sematic release commit names ([c913942](https://github.com/wizarrrr/wizarr/commit/c913942d5685fb77134e92a2c6f4a580431d053b))
* 🧽 Updated the unraid template to include different branches ([8a82a78](https://github.com/wizarrrr/wizarr/commit/8a82a78944e7efac2284142df9a03446c51d909e))


### Code Refactoring

* 📦 Update Available toasts no longer appear for non-admins ([8f18d98](https://github.com/wizarrrr/wizarr/commit/8f18d98a718d6a541919f3f81c77d314bab0e88f))

## [4.1.0-beta.1](https://github.com/wizarrrr/wizarr/compare/v4.0.0...v4.1.0-beta.1) (2024-05-03)


Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ docker run -d \

```
---
version: "3.5"
services:
wizarr:
container_name: wizarr
Expand Down
8 changes: 4 additions & 4 deletions apps/wizarr-backend/poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ def run():
if "hide_user" not in column_names:
db.execute_sql("ALTER TABLE invitations ADD COLUMN hide_user BOOLEAN DEFAULT 1")
elif "live_tv" in column_names:
db.execute_sql("ALTER TABLE invitations ALTER COLUMN live_tv BOOLEAN;")
db.execute_sql("ALTER TABLE invitations ALTER COLUMN live_tv SET DATA TYPE BOOLEAN;")
else:
print("Column hide_user already exists")

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#
# CREATED ON VERSION: V4.1.0b1
# MIGRATION: 2024-05-03_22-33-10
# CREATED: Fri May 03 2024
#

from peewee import *
from playhouse.migrate import *

from app import db

# Do not change the name of this file,
# migrations are run in order of their filenames date and time

def run():
# Use migrator to perform actions on the database
migrator = SqliteMigrator(db)

# Remove column plex_home from invitations table
with db.transaction():
# Check if the column exists
cursor = db.cursor()
cursor.execute("PRAGMA table_info(invitations);")
columns = cursor.fetchall()
column_names = [column[1] for column in columns]

if "plex_home" in column_names:
# drop the column plex_home
db.execute_sql("ALTER TABLE invitations DROP COLUMN plex_home")
else:
print("Column plex_home already dropped")

print("Migration 2024-05-03_22-33-10 complete")
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ class Invitations(BaseModel):
duration = CharField(null=True, default=None) # How long the membership is kept for
specific_libraries = CharField(default=None, null=True)
plex_allow_sync = BooleanField(null=True, default=None)
plex_home = BooleanField(null=True, default=None)
sessions = CharField(null=True, default=None)
live_tv = BooleanField(null=True, default=None)
hide_user = BooleanField(null=True, default=True)
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ class InvitationsModel(Model):
plex_allow_sync = BooleanType(required=False, default=False)
sessions = IntType(required=False, default=None)
live_tv = BooleanType(required=False, default=True)
plex_home = BooleanType(required=False, default=False)
used_at = DateTimeType(required=False, default=None, convert_tz=True)
created = DateTimeType(required=False, default=datetime.utcnow(), convert_tz=True)
hide_user = BooleanType(required=False, default=True)
Expand Down
Loading
Loading