cpan-testers / cpantesters-backend

Backend data processing for CPAN Testers
Other
0 stars 4 forks source link

Sync distribution permissions from CPAN #24

Open preaction opened 6 years ago

preaction commented 6 years ago

Once a user has been authorized to a PAUSE account (cpan-testers/cpantesters-web#14), we need to know what distributions that user is now authorized to manage.

CPAN distributes the permissions of modules in the 06perms.txt file. Neil Bowers has written a module to parse this: PAUSE::Permissions. This module can map PAUSE authors to modules.

To map that module to a distribution file, we can use CPAN::Common::Index.

Once we have that distribution file, we need to map it to a distribution name using CPAN::DistnameInfo.

Finally, we can store that information in a new table, UploadPerms, which includes the PAUSE ID, and the distribution they have access to.