@@ -22,21 +22,38 @@ function GM:PlayerSpawnProp(client, model)
22
22
end
23
23
24
24
function GM :CanProperty (client , property , entity )
25
+ print (" [TEST] CanProperty called with client:" , client , " property:" , property , " entity:" , entity )
25
26
if restrictedProperties [property ] then
27
+ print (" [TEST] Property is restricted:" , property )
26
28
lia .log .add (client , " permissionDenied" , L (" useProperty" , property ))
27
29
client :notifyLocalized (" disabledFeature" )
28
30
return false
29
31
end
30
32
31
33
if entity :IsWorld () and IsValid (entity ) then
32
- if client :hasPrivilege (" canPropertyWorldEntities" ) then return true end
34
+ print (" [TEST] Entity is world and valid." )
35
+ if client :hasPrivilege (" canPropertyWorldEntities" ) then
36
+ print (" [TEST] Client has canPropertyWorldEntities privilege." )
37
+ return true
38
+ end
39
+
40
+ print (" [TEST] Client does NOT have canPropertyWorldEntities privilege." )
33
41
lia .log .add (client , " permissionDenied" , L (" modifyWorldProperty" , property ))
34
42
client :notifyLocalized (" noModifyWorldEntities" )
35
43
return false
36
44
end
37
45
38
- if entity :GetCreator () == client and (property == " remover" or property == " collision" ) then return true end
39
- if client :hasPrivilege (" property_" .. property ) and client :isStaffOnDuty () then return true end
46
+ if entity :GetCreator () == client and (property == " remover" or property == " collision" ) then
47
+ print (" [TEST] Client is creator and property is remover or collision." )
48
+ return true
49
+ end
50
+
51
+ if client :hasPrivilege (" property_" .. property ) and client :isStaffOnDuty () then
52
+ print (" [TEST] Client has property privilege and is staff on duty." )
53
+ return true
54
+ end
55
+
56
+ print (" [TEST] Client does NOT have permission to modify property:" , property )
40
57
lia .log .add (client , " permissionDenied" , L (" modifyProperty" , property ))
41
58
client :notifyLocalized (" noModifyProperty" )
42
59
return false
0 commit comments