Comments (2)
In rule verifier and now also in browser I have to programmatically select dataframes, e.g., looping through all segments for user profiles, so the code uses the .table() method, e.g., r.table('USTSO'). table() returns the internal dataframe:
def table(self, rname=None) -> ProfileFrame:
""" return table with this name (type) """
if rname:
try:
return getattr(self, RACF._recordname_df[rname])
except KeyError:
warnings.warn(f'RACF object does not have a table {rname}')
This means, however, that views that have been improved/extended by the the publisher attribute are inaccessible/ignored:
class EnhancedProfileFrame():
"""Profile presentation properties that make data easier to report by adding fields to the original ProfileFrame.
"""
@property
def SSIGNON(self) -> ProfileFrame: # GRSIGN
"""combined DataFrame of ``._generalSSIGNON`` and ``.generals``, copying the ``GRBD_APPL_DATA`` field to show if replay protection is available for the passticket.
"""
return self._generalSSIGNON.join(self._generals['GRBD_APPL_DATA'])
So I think the table() method must be changed to return the publisher associated with the table, instead of the internal table. Then we can use the property method used for SSIGNON also for DIGTCERT and DIGTRING, to join the UACC and APPLDATA fields.
Currently:
r.table('USTSO') -(lookup in map)-> r._userTSO
with the proposed change
r.table('USTSO') -(lookup in new map)-> r.userTSO -(is assigned with atrribute-> r._userTSO
so this is a moot change, but for SSSIGNON:
r.table('GRSIGN') -(lookup in map)-> r._generalSSIGNON
which does not have the extension, but with the proposed change
r.table('GRSIGN') -(lookup in new map)-> r.SSIGNON -(publishing attribute)-> function SSIGNON -> r._generalSSIGNON joined to r._general
This approach would make it possible to "fix" more frames without having to change correlate() / __init__()
from pyracf.
Modified the way publishers are assigned as described above.
ProfilePublisher now has an attribute _doc_stubs that lists the properties that are there purely for documentation (autodoc) purpose.
from pyracf.
Related Issues (20)
- Records not in file -> errors
- GRCACC / 0507 is missing HOT 1
- NameError: name 'DSACC_RECORDTYPE' is not defined HOT 7
- Autofit FTW
- Filtered parse breaks _correlate HOT 4
- Should ownertree and grouptree not be '@properties'?
- different ways to access the grouptree/ownertree HOT 2
- do not mix proper code changes with distribution related changes HOT 2
- .acl() usage HOT 7
- change name of selection methods? HOT 2
- minimal columns on .acl( ) or generate all columns even if they are empty by definition?
- parse fails when input unload file has garbage at the end HOT 1
- split capabilities in separate packages
- idea: intelligent selection or positioning of columns in ProfileFrame HOT 1
- UID and GID values are fixed length, 10 character, with leading 0, making it harder to read/use the values HOT 3
- idea: convert from yaml to strictYAML
- forget about Wiki? HOT 2
- idea: add r.isuser() -> bool and r.isgroup() -> bool methods to test existence of an id
- idea: autopickle HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyracf.