a17d2a223858610d187171f80ea9f07ddf8921dd,modules/templates/RLPPTM/menus.py,S3MainMenu,menu_modules,#Any#,36
Before Change
def menu_modules(cls):
Modules Menu
return [MM("Organizations", c="org", f="organisation"),
MM("Finance", c="fin", f="index"),
MM("Register Test Station",
c="default", f="index", args=["register"],
check = lambda i: not current.auth.s3_logged_in(),
),
]
// -------------------------------------------------------------------------
@classmethod
def menu_org(cls):
After Change
auth = current.auth
has_role = auth.s3_has_role
menu = [MM("Organizations",
c = "org", f = "organisation",
restrict = ("ORG_GROUP_ADMIN", "ORG_ADMIN"),
),
// TODO Public Register of Test Stations:
//MM("Find Test Station",
// c = "org", f = "facility",
// ),
MM("Register Test Station",
c = "default", f = "index", args = ["register"],
check = lambda i: not current.auth.s3_logged_in(),
),
]
// Link to voucher management
if auth.s3_logged_in():
if has_role("PROGRAM_MANAGER"):
label, f = "Voucher Programs", "voucher_program"
elif has_role("VOUCHER_PROVIDER"):
label, f = "Voucher Billing", "voucher_debit"
elif has_role("VOUCHER_ISSUER"):
label, f = "Vouchers", "voucher"
if f:
menu.insert(0, MM(label, c="fin", f=f))
return menu
// -------------------------------------------------------------------------
@classmethod
def menu_org(cls):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: sahana/eden
Commit Name: a17d2a223858610d187171f80ea9f07ddf8921dd
Time: 2021-01-16
Author: dominic@nursix.org
File Name: modules/templates/RLPPTM/menus.py
Class Name: S3MainMenu
Method Name: menu_modules
Project Name: sahana/eden
Commit Name: a17d2a223858610d187171f80ea9f07ddf8921dd
Time: 2021-01-16
Author: dominic@nursix.org
File Name: modules/templates/RLPPTM/menus.py
Class Name: S3MainMenu
Method Name: menu_modules
Project Name: explosion/spaCy
Commit Name: e7aa25d9b1107a07896f34bfef4bb7f0c630a5ad
Time: 2019-03-16
Author: ines@ines.io
File Name: spacy/cli/train.py
Class Name:
Method Name: _get_progress
Project Name: tensorflow/datasets
Commit Name: 587282014dc220b1a7f0ee465e85f44f8c887ff5
Time: 2021-04-06
Author: kivlichan@google.com
File Name: tensorflow_datasets/text/civil_comments.py
Class Name: CivilComments
Method Name: _split_generators