Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Nodelet Settings and Proposed future changes to Approval System

by demerphq (Chancellor)
on Sep 12, 2004 at 12:12 UTC ( #390403=pmdevtopic: print w/ replies, xml ) Need Help??
demerphq has raised the following topic:

Ive revamped Nodelet Settings to use nodelet permissions In a sense this can be seen as a prototype of what I want to do with the approval system.

My proposal is this: We add a column to the nodegroup table to store either a flag or nodetype of the node mentioned. This flag/nodetype tells us if the entry is a user/group/evalable rule. The user/group scenario would be unchanged. The evalable rule would be evalled and then its return would determine what would happen. I propose that if it returns 0 it is a deny access rule and says the user is explicity NOT approved despite any further rules or group memberships. If it returns 1 it implies the user is explicitly approved and not to bother searching the rest of the list. If it returns undef it implies that the rule doesnt apply at all and to continue applying further rules or checking further membership.

The paralel here is that the "apply_order" is much like a group list, (forget about the fact that we are dealing with lists of things you can see based on membership, pretend the results are just 1/undef). The entries in the setting that start with \s*{ are code rules that are evalled, the other entries just return a list.

The advantages of using a flag are that we can have different types of "evalable" rule and still have a petty efficient system, the advantage of type is that it could be used with the PM inheritance system to say that anything inheriting from a particular nodetype has rule like behaviour. I could go either way.

The reason the flag/nodetype is necessary IMO is because we dont want to do a nodefetch on every node in the usergroup table to find out its type. I dont see much reason in forcing the caching of the full node of all the users in the various groups. Maybe im missing something and this cost is acceptable. It certainly would make the endeavour a lot easier to do as it wouldnt requiring changing the table structure or any of the code that interacts with the table (of which there is a fair amount.)

Please feed me criticism on any of this. Cheers.


---
demerphq

    First they ignore you, then they laugh at you, then they fight you, then you win.
    -- Gandhi

    Flux8


Comment on Nodelet Settings and Proposed future changes to Approval System
Note Orphanage
by de-merphq (Beadle) on Sep 20, 2004 at 23:03 UTC
    note_id parent_node position root_node
    1123811167011167
    8568530853
    8558530853
    9381430143
    1381137101371
    1988198501985
    2115138101371
    2507249602496
    2639263502635
    2116221031021009
    3988398603986
    4718471604716
    4742474004740
    4824476204762
    4799458404584
    5600558305583
    5967595205952
    6131612806128
    6237623606236
    6245623606236
    6258254902549
    6745670506705
    6768674506705
    6917691006910
    7123710707107
    7400739907399
    7747774507745
    8671866908669
    8686866908669
    8696866908669
    8720866908669
    9012900309003
    9086908409084
    1074110736010729
    1073610729010729
    9226917709177
    9305928909289
    9388938709387
    9389938709387
    9507950509505
    9720971809718
    9766975309753
    9768976609753
    9950988109881
    1007910069010069
    10208950709505
    1027010257010257
    1028510284010284
    1028610284010284
    1029710295010295
    1030810297010295
    1031310309010309
    1089010886010886
    1089510886010886
    1089610886010886
    1089710886010886
    1089810890010886
    1090310898010886
    1108210903010886
    1127811267011267
    1165011629011629
    1449314490014490
    1449914490014490
    1452414490014490
    1453614493014490
    1453814493014490
    1454814490014490
    1455214548014490
    1455614490014490
    1456614552014490
    1467114490014490
    1470614703014703
    1472914703014703
    1522615218015218
    2177721769021766
    1672716710016710
    1674516710016710
    1680116800016800
    1684316832016832
    1685616625016625
    1721116663016663
    2176921766021766
    2174221009021009
    1867118667018667
    1881818808018808
    1881918808018808
    1882018808018808
    1883518829018829
    1884718837018837
    1885018849018849
    1890718892018892
    1903919038019038
    1962919618019618
    1967719629019618
    2088520866020866
    2103121009021009
    2143721430021430
    2162321552021552
    2167721670021670
    2168321677021670
    2207922076022076
    2211822087022087
    2222922118022087
    2409224079024079
    2439124390024390
    2472224721024721
    2473524721024721
    2474724735024721
    2475124747024721
    2475624721024721
    2476224756024721
    2480224795024795
    2480424795024795
    2492724805024805
    2494724925024925
    2495724925024925
    2495824947024925
    2565725656025656
    2665726651026651
    2666726651026651
    2667226651026651
    2819428160028160
    2851328508028508
    2854728513028508
    2966529663029663
    2966629663029663
    2966929663029663
    2967529663029663
    2968529665029663
    2968729685029663
    2968829685029663
    2968929675029663
    2969329689029663
    2969729689029663
    2970229689029663
    2993929685029663
    3015530141030141
    3014230141030141
    3044730303030303
    3075130749030749
    3076430751030749
    3076930764030749
    3079330769030749
    3094430937030937
    3268832657032657
    3271132688032657
    3274832688032657
    3275632748032657
    3501135006035006
    3501535006035006
    3501835011035006
    3502535018035006
    3512835025035006
    3534135281035281
    3542035281035281
    3545835006035006
    3546435458035006
    3548735464035006
    3639236382036382
    3672936710036710
    3673236729036710
    3903139030039030
    3903239030039030
    3903939030039030
    3905539030039030
    4194141939041939
    4292042882042882
    4359543590043590
    4373743595043590
    4508245060045060
    4570145698045698
    5004150037050037
    5004250037050037
    5004350042050037
    5004550042050037
    5072650723050723
    5074150723050723
    5075150586050586
    5084150741050723
    5130351296051296
    5136951368051368
    5137151368051368
    5137851371051368
    5138351368051368
    5138451369051368
    5138651368051368
    5138751386051368
    5139051369051368
    5139651371051368
    5229252112052070
    5354053517053517
    5453454529054529
    5467954534054529
    5484554843054843
    5484654845054843
    5484854845054843
    5484954848054843
    5485154843054843
    5486654843054843
    5495454844054844
    5521354866054843
    5943359422059422
    5950759422059422
    6308762761062761
    6481264808064808
    6625766253066253
    6654866525066525
    6656966525066525
    7012270054070054
    7032270055070054
    7138271375071375
    7337473366073366
    7713677128077127
    7843678420078420
    7847578420078420
    7855678475078420
    7857078420078420
    7859178420078420
    7938879381079381
    7962079381079381
    8108180993080993
    8745487402087402
    8776487502087506
    8944789440089440
    8945789447089440
    8947489440089440
    8947789440089440
    8947889477089440
    8951189440089440
    8951289447089440
    8951589478089440
    8952089512089440
    8954089440089440
    8955289440089440
    8958589457089440
    8958989440089440
    8986089858089858
    9285292850092850
    9334593344093344
    9334693344093344
    9342893383093383
    9822898226098226
    1043401042030104203
    1101991101820110182
    1116641116630111663
    1123501123490112349
    1123511123490112349
    1123561123490112349
    1150711150440115044
    1150761150440115044
    1151201150760115044
    1189281189150118915
    1189321189150118915
    1254901254830125483
    126316712307107
    1268871268820126882
    1301381301360130136
    1301391301360130136
    1301411301390130136
    1314331314290131429
    1314551314290131429
    1317591312780131278
    1343391343360134336
    1365611365430136543
    1367721365430136543
    1383201383170138317
    1387781387740138774
    1427731427650142765
    1475311473070147307
    1561011560380156038
    1562141562080156208
    1634901634850163485
    1641131641090164109
    1772501772480177248
    1772531772500177248
    1832301832090183209
    1856731854350185435
    1936271933520193352
    2003332003170200317
    2124132124100212410
    2124142124100212410
    2124162124100212410
    2124212124160212410
    2124762124210212410
    2262242262230226223
    24321521009021009
    2634432630130263013
    2796942796900279690
    2797262796940279690
    2797762796900279690
    2904482901510290151
    2904702904480290151
    300157267102670
    2671267000
    3348000
    3343000
    3355000
    3361000
    3357000
    3370000
    3378000
    3380000
    4992498200
    6756675000
    7629262600
    7586262600
    7615262600
    8291829000
    8724869800
    9691962900
    10143262600
    10217000
    111221111700
    111231111700
    111241111700
    111361111700
    171181711000
    171211711000
    171461714400
    171481714400
    18007000
    191111906700
    200272002400
    200332002400
    20037000
    213692134701842
    21597000
    218932189100
    23102000
    25262000
    25263000
    25264000
    313813136400
    313823136400
    3215832120032071
    3543435411035340
    3580035780035534
    4106441054040926
    43834000
    4367743674043528
    4375943674043528
    43854000
    43872000
    43884000
    43886000
    43899000
    43901000
    4394743945043943
    43956000
    44048000
    4405444053043838
    44312000
    44319000
    44353000
    4437544358044300
    44380000
    44389000
    44515000
    44534000
    44662000
    44664000
    44704000
    44732000
    44932000
    44974000
    45020000
    45064000
    45076000
    45083000
    45096000
    45141000
    45149000
    45201000
    45286000
    45288000
    45308000
    45311000
    45322000
    45463000
    45464000
    45479000
    454854522101835
    457334573200
    457374573200
    457384573200
    457394573200
    457434573200
    457504573200
    45780000
    45810000
    45818000
    45834000
    45985000
    468524685100
    473984739700
    488294882000
    496754966400
    496654966400
    496744966400
    5008650084049814
    5009250084049814
    5013650084049814
    503085029900
    514415144000
    514435144000
    514455144000
    520725207000
    521125207000
    5314653137053127
    53829000
    543955439400
    545215386701877
    587475874100
    596285962501830
    61902000
    6218262133060347
    640206401200
    649016490000
    65514262600
    656096560501830
    701167010700
    701357010700
    738467378001825
    7515775154074985
    8227582267082262
    8242582267082262
    8388883886083879
    8518085084085055
    8730787306087201
    8745387446087298
    87892829000
    9297992969092934
    9312893125091840
    938499384701825
    946019451002661
    953039529202661
    10066910066701834
    1123461122820112176
    11429111426501833
    12326612325501834
    1280071280060127927
    1281871280060127927
    1286801286720128666
    1286901286720128666
    13834113833800
    13834913833800
    13836113833800
    142474000
    14272741434040779
    143855000
    143896000
    146791000
    146794000
    146944000
    146946000
    146986000
    147813147810043546
    147820147810043546
    1501391501370150129
    1508971508940150889
    153144000
    15335215335101835
    154050000
    15611015610301877
    163057000
    163213000
    1650251649820164981
    1661731661700166100
    1662061661700166100
    1668821667730166656
    166935000
    167956000
    167958000
    167959000
    167960000
    1689921689910168956
    1689981689910168956
    169045000
    169047000
    170308000
    170801000
    171258000
    171341000
    172115000
    172117000
    172118000
    173192000
    1744581744560174449
    1744591744560174449
    174462000
    174465000
    1745261744560174449
    1748091744560174449
    175572000
    176494000
    177029000
    178285000
    1785501785110178427
    1785691785570178427
    178608000
    1786121785570178427
    1787411786030178427
    179959000
    180493000
    180494000
    180510000
    181588000
    181611000
    181657000
    18273418273100
    187681000
    1877361877230187703
    1880301877230187703
    188338000
    188562000
    1890671890640189023
    189442000
    19154319153501824
    19207519207301824
    19828819828601826
    200104000
    200449000
    200632000
    2031322031260203112
    2044962044860204411
    2045352044860204411
    205772000
    20659420659301826
    2078522078490207823
    2110102109990210664
    2125742120270211998
    2210042210000220983
    2234832232580223254
    2242022241980224195
    2247692235230223302
    2247902246970224552
    2250762248170224552
    2278392278360227827
    2278432278360227827
    22966022964401837
    23934923907001835
    2423852422680242169
    2437332437060243682
    2444442444430244429
    2444482444430244429
    244469000
    244470000
    244508000
    244509000
    2447802447790244729
    2449952447790244729
    2458862447790244729
    2514902514890251071
    25349725345601830
    28198828166001839
    29033729028301824
    2979932960190295929
    30059530055102661
    30094830094201837
    30447719152601824
    31608931595301826
    32027832027701836
    32700732691701837
    32701532691701837
    33357533357001839
    33514733500601826
    33937733935601834
    36268736268101837
    36276636268101837
    36278636268101837
    36814336814201824
    39386039385501840
    note_id parent_node position root_node
    11238111670392529
    8568530392529
    8558530392529
    9381430392529
    138113710392529
    198819850392529
    250724960392529
    263926350392529
    2671267000
    3348000
    3343000
    3355000
    3361000
    3357000
    3370000
    3378000
    3380000
    398839860392529
    471847160392529
    474247400392529
    482447620392529
    479945840392529
    4992498200
    560055830392529
    596759520392529
    613161280392529
    623762360392529
    624562360392529
    625825490392529
    674567050392529
    6756675000
    691769100392529
    712371070392529
    7629262600
    740073990392529
    7586262600
    7615262600
    774777450392529
    8291829000
    867186690392529
    868686690392529
    869686690392529
    872086690392529
    8724869800
    901290030392529
    908690840392529
    10736107290392529
    922691770392529
    930592890392529
    938893870392529
    938993870392529
    950795050392529
    9691962900
    972097180392529
    976697530392529
    995098810392529
    10143262600
    10079100690392529
    10217000
    10270102570392529
    10285102840392529
    10286102840392529
    10297102950392529
    10313103090392529
    10890108860392529
    10895108860392529
    10896108860392529
    10897108860392529
    111221111700
    111231111700
    111241111700
    111361111700
    11278112670392529
    11650116290392529
    14493144900392529
    14499144900392529
    14524144900392529
    14548144900392529
    14556144900392529
    14671144900392529
    14706147030392529
    14729147030392529
    15226152180392529
    16727167100392529
    16745167100392529
    16801168000392529
    16843168320392529
    16856166250392529
    171181711000
    171211711000
    171461714400
    171481714400
    17211166630392529
    21769217660392529
    21742210090392529
    18007000
    18671186670392529
    18818188080392529
    18819188080392529
    18820188080392529
    18835188290392529
    18847188370392529
    18850188490392529
    18907188920392529
    19039190380392529
    191111906700
    19629196180392529
    200272002400
    200332002400
    20037000
    20885208660392529
    21031210090392529
    213692134701842
    21437214300392529
    21597000
    21623215520392529
    21677216700392529
    218932189100
    22079220760392529
    22118220870392529
    23102000
    24092240790392529
    24391243900392529
    24722247210392529
    24735247210392529
    24756247210392529
    24802247950392529
    24804247950392529
    24927248050392529
    24947249250392529
    24957249250392529
    25262000
    25263000
    25264000
    25657256560392529
    26657266510392529
    26667266510392529
    26672266510392529
    28194281600392529
    28513285080392529
    29665296630392529
    29666296630392529
    29669296630392529
    29675296630392529
    30155301410392529
    30142301410392529
    30447303030392529
    30751307490392529
    30944309370392529
    313813136400
    313823136400
    3215832120032071
    32688326570392529
    35011350060392529
    35015350060392529
    35341352810392529
    35420352810392529
    3543435411035340
    35458350060392529
    3580035780035534
    36392363820392529
    36729367100392529
    39031390300392529
    39032390300392529
    39039390300392529
    39055390300392529
    4106441054040926
    41941419390392529
    42920428820392529
    43595435900392529
    43834000
    4367743674043528
    4375943674043528
    43854000
    43872000
    43884000
    43886000
    43899000
    43901000
    4394743945043943
    43956000
    44048000
    4405444053043838
    44312000
    44319000
    44353000
    4437544358044300
    44380000
    44389000
    44515000
    44534000
    44662000
    44664000
    44704000
    44732000
    44932000
    44974000
    45020000
    45064000
    45076000
    45082450600392529
    45083000
    45096000
    45141000
    45149000
    45201000
    45286000
    45288000
    45308000
    45311000
    45322000
    45463000
    45464000
    45479000
    454854522101835
    45701456980392529
    457334573200
    457374573200
    457384573200
    457394573200
    457434573200
    457504573200
    45780000
    45810000
    45818000
    45834000
    45985000
    468524685100
    473984739700
    488294882000
    496754966400
    496654966400
    496744966400
    50041500370392529
    50042500370392529
    5008650084049814
    5009250084049814
    5013650084049814
    503085029900
    50726507230392529
    50741507230392529
    50751505860392529
    51303512960392529
    51369513680392529
    51371513680392529
    51383513680392529
    51386513680392529
    514415144000
    514435144000
    514455144000
    520725207000
    521125207000
    5314653137053127
    53540535170392529
    53829000
    543955439400
    545215386701877
    54534545290392529
    54845548430392529
    54851548430392529
    54866548430392529
    54954548440392529
    587475874100
    59433594220392529
    59507594220392529
    596285962501830
    61902000
    6218262133060347
    63087627610392529
    640206401200
    64812648080392529
    649016490000
    65514262600
    656096560501830
    66257662530392529
    66548665250392529
    66569665250392529
    701167010700
    70122700540392529
    701357010700
    70322700550392529
    71382713750392529
    73374733660392529
    738467378001825
    7515775154074985
    78436784200392529
    78475784200392529
    78570784200392529
    78591784200392529
    79388793810392529
    79620793810392529
    81081809930392529
    8227582267082262
    8242582267082262
    8388883886083879
    8518085084085055
    8730787306087201
    8745387446087298
    87454874020392529
    87892829000
    89447894400392529
    89474894400392529
    89477894400392529
    89511894400392529
    89540894400392529
    89552894400392529
    89589894400392529
    89860898580392529
    92852928500392529
    9297992969092934
    9312893125091840
    93345933440392529
    93346933440392529
    93428933830392529
    938499384701825
    946019451002661
    953039529202661
    98228982260392529
    10066910066701834
    1043401042030392529
    1101991101820392529
    1116641116630392529
    1123461122820112176
    1123501123490392529
    1123511123490392529
    1123561123490392529
    11429111426501833
    1150711150440392529
    1150761150440392529
    1189281189150392529
    1189321189150392529
    12326612325501834
    1254901254830392529
    1268871268820392529
    1280071280060127927
    1281871280060127927
    1286801286720128666
    1286901286720128666
    1301381301360392529
    1301391301360392529
    1314331314290392529
    1314551314290392529
    1317591312780392529
    1343391343360392529
    1365611365430392529
    1367721365430392529
    1383201383170392529
    13834113833800
    13834913833800
    13836113833800
    1387781387740392529
    142474000
    14272741434040779
    1427731427650392529
    143855000
    143896000
    146791000
    146794000
    146944000
    146946000
    146986000
    1475311473070392529
    147813147810043546
    147820147810043546
    1501391501370150129
    1508971508940150889
    153144000
    15335215335101835
    154050000
    1561011560380392529
    15611015610301877
    1562141562080392529
    163057000
    163213000
    1634901634850392529
    1641131641090392529
    1650251649820164981
    1661731661700166100
    1662061661700166100
    1668821667730166656
    166935000
    167956000
    167958000
    167959000
    167960000
    1689921689910168956
    1689981689910168956
    169045000
    169047000
    170308000
    170801000
    171258000
    171341000
    172115000
    172117000
    172118000
    173192000
    1744581744560174449
    1744591744560174449
    174462000
    174465000
    1745261744560174449
    1748091744560174449
    175572000
    176494000
    177029000
    1772501772480392529
    178285000
    1785501785110178427
    1785691785570178427
    178608000
    1786121785570178427
    1787411786030178427
    179959000
    180493000
    180494000
    180510000
    181588000
    181611000
    181657000
    18273418273100
    1832301832090392529
    1856731854350392529
    187681000
    1877361877230187703
    1880301877230187703
    188338000
    188562000
    1890671890640189023
    189442000
    19154319153501824
    19207519207301824
    1936271933520392529
    19828819828601826
    200104000
    2003332003170392529
    200449000
    200632000
    2031322031260203112
    2044962044860204411
    2045352044860204411
    205772000
    20659420659301826
    2078522078490207823
    2110102109990210664
    2124132124100392529
    2124142124100392529
    2124162124100392529
    2125742120270211998
    2210042210000220983
    2234832232580223254
    2242022241980224195
    2247692235230223302
    2247902246970224552
    2250762248170224552
    2262242262230392529
    2278392278360227827
    2278432278360227827
    22966022964401837
    23934923907001835
    2423852422680242169
    243215210090392529
    2437332437060243682
    2444442444430244429
    2444482444430244429
    244469000
    244470000
    244508000
    244509000
    2447802447790244729
    2449952447790244729
    2458862447790244729
    2514902514890251071
    25349725345601830
    2634432630130392529
    2796942796900392529
    2797762796900392529
    28198828166001839
    29033729028301824
    2904482901510392529
    2979932960190295929
    30059530055102661
    30094830094201837
    30447719152601824
    31608931595301826
    32027832027701836
    32700732691701837
    32701532691701837
    33357533357001839
    33514733500601826
    33937733935601834
    36268736268101837
    36276636268101837
    36278636268101837
    36814336814201824
    39386039385501840

Log In?
Username:
Password:

What's my password?
Create A New User
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (9)
As of 2014-11-27 16:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (186 votes), past polls