Merge branch '3.0' into image-management-refactoring

# Conflicts:
#	gns3server/api/routes/controller/permissions.py
This commit is contained in:
grossmj committed 2021-09-20 17:06:46 +09:30
commit d8bceaad5d
618 files changed
+4841 -13708

No files matched your search

+4 -4
View File
@@ -53,19 +53,19 @@ def create_default_roles(target, connection, **kw):
default_permissions = [
{
"description": "Allow access to all endpoints",
"methods": ["GET", "HEAD", "POST", "PUT", "DELETE", "PATCH"],
"methods": ["GET", "POST", "PUT", "DELETE"],
"path": "/",
"action": "ALLOW"
},
{
"description": "Allow to create and list projects",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/projects",
"action": "ALLOW"
},
{
"description": "Allow to create and list templates",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/templates",
"action": "ALLOW"
},
@@ -77,7 +77,7 @@ def create_default_roles(target, connection, **kw):
},
{
"description": "Allow access to all symbol endpoints",
"methods": ["GET", "HEAD", "POST"],
"methods": ["GET", "POST"],
"path": "/symbols/*",
"action": "ALLOW"
},
+1 -1
View File
@@ -38,7 +38,7 @@ class Role(BaseTable):
__tablename__ = "roles"
role_id = Column(GUID, primary_key=True, default=generate_uuid)
name = Column(String, unique=True)
name = Column(String, unique=True, index=True)
description = Column(String)
is_builtin = Column(Boolean, default=False)
permissions = relationship("Permission", secondary=permission_role_link, back_populates="roles")