Skip to content
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

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

vichugofsl
Copy link
Collaborator

@vichugofsl vichugofsl commented Jul 24, 2023

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

  • I have executed the following command on my local environment:
python3 load/UpdateDBPAccessTable.py test

@vichugofsl vichugofsl self-assigned this Jul 24, 2023
@@ -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}:
Copy link
Collaborator Author

@vichugofsl vichugofsl Jul 25, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vichugofsl vichugofsl requested a review from bradflood July 25, 2023 12:46
@@ -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'}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. rename to orgHasGrantedGeneralDownloadPermission
  2. We should include Pioneer Bible Translators in this list (and remove method isPioneerBibleTranslator)

Copy link
Collaborator Author

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


def hasGeneralDownloadPermission(self, record):
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to hasGrantedGeneralDownloadPermission

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -83,7 +88,7 @@ def process(self, filesetList):

def _isSILOnly(self, record):
Copy link
Collaborator

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

…ns to a specific list of organizations. Include 'Pioneer Bible Translators' in this list.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants