Resolved few intialization issue with Node model data, moved the

privileges functionality out of the backform.pgadmin.js to make it more
modular. Now - privileges will expect the privileges data in following
format:
<name_of_the_property> : [{
    "privileges": [{
        "privilege_type": <privilege_type>,
        "privilege": true,
        "with_grant": false
    },
    ...
    ],
    "grantee": <grantee>,
    "grantor": <grantor>
    },
   ...
]

Example:
acl": [{
    "privileges": [{
        "privilege_type": "CONNECT",
        "privilege": true,
        "with_grant": false
     	}],
    "grantee": '',
    "grantor": 'ashesh'
},{
    "privileges": [{
        "privilege_type": "CREATE",
        "privilege": true,
        "with_grant": false
    },{
        "privilege": true,
        "privilege_type": "TEMPORARY",
        "with_grant": false
    }],
    "grantee": test,
    "grantor": ashesh
}]
This commit is contained in:
Ashesh Vashi
2015-12-23 12:10:20 +05:30
parent bf5170bc89
commit c51ecc69e4
8 changed files with 575 additions and 308 deletions

View File

@@ -57,6 +57,7 @@ class PGChildModule:
def __init__(self, *args, **kwargs):
self.min_ver = 1000000000
self.max_ver = 0
self.server_type = None
self.attributes = {}
super(PGChildModule, self).__init__(*args, **kwargs)