From 083d020c57f546a0f9b6f56a6829efaafa00cb2d Mon Sep 17 00:00:00 2001 From: Mark Huang Date: Tue, 19 Sep 2006 19:03:47 +0000 Subject: [PATCH] - move assertion to right place --- PLC/Methods/AdmUpdateNode.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/PLC/Methods/AdmUpdateNode.py b/PLC/Methods/AdmUpdateNode.py index e5391aff..109e0af6 100644 --- a/PLC/Methods/AdmUpdateNode.py +++ b/PLC/Methods/AdmUpdateNode.py @@ -53,12 +53,12 @@ class AdmUpdateNode(Method): node = nodes.values()[0] + # Authenticated function + assert self.caller is not None + # If we are not an admin, make sure that the caller is a # member of the site at which the node is located. if 'admin' not in self.caller['roles']: - # Authenticated function - assert self.caller is not None - if node['site_id'] not in self.caller['site_ids']: raise PLCPermissionDenied, "Not allowed to delete nodes from specified site" -- 2.47.0