diff --git a/game/Main.tscn b/game/Main.tscn index 7c3f980..50dc1d3 100644 --- a/game/Main.tscn +++ b/game/Main.tscn @@ -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 = "Page" [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 ) ] diff --git a/game/web_perm_test/WebPermTest.gd b/game/web_perm_test/WebPermTest.gd new file mode 100644 index 0000000..55484fd --- /dev/null +++ b/game/web_perm_test/WebPermTest.gd @@ -0,0 +1,6 @@ +extends WebPermission + +export(int, FLAGS, "VIEW", "CREATE", "EDIT", "DELETE") var permissions : int = 1 + +func _get_permissions(request : WebServerRequest): + return permissions diff --git a/game/web_perm_test/new_webpermission.tres b/game/web_perm_test/new_webpermission.tres new file mode 100644 index 0000000..7bc5b57 --- /dev/null +++ b/game/web_perm_test/new_webpermission.tres @@ -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