Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
dify
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
ai-tech
dify
Commits
c13a90ee
Unverified
Commit
c13a90ee
authored
Aug 12, 2023
by
conghaoyuan
Committed by
GitHub
Aug 12, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
only admin and owner can delete app (#810)
parent
5a7b51f8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
app.py
api/controllers/console/app/app.py
+4
-0
No files found.
api/controllers/console/app/app.py
View file @
c13a90ee
...
@@ -294,6 +294,10 @@ class AppApi(Resource):
...
@@ -294,6 +294,10 @@ class AppApi(Resource):
def
delete
(
self
,
app_id
):
def
delete
(
self
,
app_id
):
"""Delete app"""
"""Delete app"""
app_id
=
str
(
app_id
)
app_id
=
str
(
app_id
)
if
current_user
.
current_tenant
.
current_role
not
in
[
'admin'
,
'owner'
]:
raise
Forbidden
()
app
=
_get_app
(
app_id
,
current_user
.
current_tenant_id
)
app
=
_get_app
(
app_id
,
current_user
.
current_tenant_id
)
db
.
session
.
delete
(
app
)
db
.
session
.
delete
(
app
)
...
...
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