mirror of
https://github.com/Relintai/pandemonium_cms.git
synced 2024-11-14 09:37:19 +01:00
Added a new extremely simple test WebPermission.
This commit is contained in:
parent
3dbe3ac71f
commit
013ec29a8e
@ -1,10 +1,11 @@
|
||||
[gd_scene load_steps=11 format=2]
|
||||
[gd_scene load_steps=12 format=2]
|
||||
|
||||
[ext_resource path="res://Main.gd" type="Script" id=1]
|
||||
[ext_resource path="res://addons/web_pages/classes/WebPage.gd" type="Script" id=2]
|
||||
[ext_resource path="res://addons/web_pages/classes/post_entries/WebPageEntryTitleText.gd" type="Script" id=3]
|
||||
[ext_resource path="res://addons/web_pages/classes/post_entries/WebPageEntryText.gd" type="Script" id=4]
|
||||
[ext_resource path="res://addons/web_pages/classes/post_entries/WebPageEntryImage.gd" type="Script" id=5]
|
||||
[ext_resource path="res://web_perm_test/new_webpermission.tres" type="WebPermission" id=6]
|
||||
|
||||
[sub_resource type="Resource" id=1]
|
||||
script = ExtResource( 3 )
|
||||
@ -57,6 +58,7 @@ data = "<a href=\"/page\">Page</a>"
|
||||
|
||||
[node name="page" type="WebNode" parent="WebRoot"]
|
||||
uri_segment = "page"
|
||||
web_permission = ExtResource( 6 )
|
||||
script = ExtResource( 2 )
|
||||
allow_web_interface_editing = true
|
||||
entries = [ SubResource( 1 ), SubResource( 4 ), SubResource( 5 ), SubResource( 3 ), SubResource( 2 ) ]
|
||||
|
6
game/web_perm_test/WebPermTest.gd
Normal file
6
game/web_perm_test/WebPermTest.gd
Normal file
@ -0,0 +1,6 @@
|
||||
extends WebPermission
|
||||
|
||||
export(int, FLAGS, "VIEW", "CREATE", "EDIT", "DELETE") var permissions : int = 1
|
||||
|
||||
func _get_permissions(request : WebServerRequest):
|
||||
return permissions
|
7
game/web_perm_test/new_webpermission.tres
Normal file
7
game/web_perm_test/new_webpermission.tres
Normal file
@ -0,0 +1,7 @@
|
||||
[gd_resource type="WebPermission" load_steps=2 format=2]
|
||||
|
||||
[ext_resource path="res://web_perm_test/WebPermTest.gd" type="Script" id=1]
|
||||
|
||||
[resource]
|
||||
script = ExtResource( 1 )
|
||||
permissions = 15
|
Loading…
Reference in New Issue
Block a user