-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FCBHDBP-584 uploader (python) - assign download permissions (19x) for all content from SIL MSEA #117
base: develop
Are you sure you want to change the base?
Conversation
@@ -73,7 +75,10 @@ def process(self, filesetList): | |||
if accessIdInLPTS and not accessIdInDBP: | |||
insertRows.append((hashId, accessId)) | |||
elif accessIdInDBP and not accessIdInLPTS: | |||
print("accessId not in DBP or LPTS, but not deleting.. accessId: %s hashId: %s" % (accessId, hashId)) | |||
if accessId not in {191, 193}: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradflood This line is part of ticket: DBP-585 (uploader (python) - delete from access_group_filesets if not in LPTS (except 19x)
load/UpdateDBPAccessTable.py
Outdated
@@ -15,7 +15,10 @@ def __init__(self, config, db, dbOut, languageReader): | |||
self.db = db | |||
self.dbOut = dbOut | |||
self.languageReader = languageReader | |||
self.orgWithGeneralDownloadPermission = self.config.org_with_general_download_permission if self.config.org_with_general_download_permission != None else {'SIL', 'SIL MSEA'} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- rename to orgHasGrantedGeneralDownloadPermission
- We should include Pioneer Bible Translators in this list (and remove method isPioneerBibleTranslator)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradflood It has been renamed to orgHasGrantedGeneralDownloadPermission
. Also, I have added "Bible Translators" in the list and I have removed the isPioneerBibleTranslator
method. See: https://github.com/faithcomesbyhearing/dbp-etl/pull/117/files#diff-1fd781079e6b9caf6a8d8693ceb7aeb9b93a55e172acd2406273d04f4c1a5c1bR18
load/UpdateDBPAccessTable.py
Outdated
|
||
def hasGeneralDownloadPermission(self, record): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
rename to hasGrantedGeneralDownloadPermission
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradflood I have renamed it as you can see in the following line:
load/UpdateDBPAccessTable.py
Outdated
@@ -83,7 +88,7 @@ def process(self, filesetList): | |||
|
|||
def _isSILOnly(self, record): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isSILOnly can be deleted since "SIL" is added to the org list
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@bradflood It has been removed and I have also removed the method _isPioneerBibleTranslatorsOnly
. See: https://github.com/faithcomesbyhearing/dbp-etl/pull/117/files#diff-1fd781079e6b9caf6a8d8693ceb7aeb9b93a55e172acd2406273d04f4c1a5c1bL84
…ns to a specific list of organizations. Include 'Pioneer Bible Translators' in this list.
Description
Since ETL needed to add 'SIL MSEA' to the list of organizations that are granted general download permission, but couldn't implement this using a wildcard match on the licensor string, I have implemented new logic. This logic reads from the configuration and provides download permissions to a specific list of organizations.
NOTE
This PR has worked on the ticket DBP-585 (uploader (python) - delete from access_group_filesets if not in LPTS (except 19x) as well.
Issue Link
https://fullstacklabs.atlassian.net/browse/FCBHDBP-584
How do I QA this
python3 load/UpdateDBPAccessTable.py test
Trans-test-lpts-2020-07-24.sql.log