redbox-mint / redbox-portal

The core ReDBox application including the web portal and APIs.
https://www.redboxresearchdata.com.au
GNU General Public License v3.0
7 stars 15 forks source link

new user with records assigned to, makes the portal error at login and crashes it #532

Closed moisbo closed 5 years ago

moisbo commented 5 years ago

If a user that logs in via AAF has records in the database associated to their email/permissions, the redbox-portal crashes with 500 error

(In vagrant) Steps to reproduce:

andrewbrazzatti commented 5 years ago

Hey @moisbo,

Can you attach a screenshot of what the db.getCollection('rdmp').find({}) looks like after you've created the record with admin and before the AAF user logs in?

moisbo commented 5 years ago

Sure thing.

{
    "metaMetadata" : {
        "brandId" : "5c622093bebd600006c46597",
        "createdBy" : "admin",
        "type" : "rdmp",
        "form" : "default-1.0-draft"
    },
    "authorization" : {
        "view" : [],
        "edit" : [],
        "viewRoles" : [ 
            "Admin", 
            "Librarians"
        ],
        "editRoles" : [ 
            "Admin", 
            "Librarians"
        ],
        "editPending" : [ 
            "Moises.Sacal@uts.edu.au"
        ],
        "viewPending" : [ 
            "Moises.Sacal@uts.edu.au"
        ]
    },
    "metadata" : {
        "" : {},
        "title" : "Contact zones: activism, art and media in Italy, 1994-2006",
        "dc:identifier" : "100001797",
        "description" : "The last decade in Italy has seen the proliferation of innovative activist practices resulting from a productive traffic between political theory with art and media. Merging with activism, art and media practices take a dynamic role in the promotion of social change while simultaneously providing a critical commentary to social and political issues in contemporary Italy. This research, which will result in a book length study, will be the first to explore the emergence of contact zones in these practices. ",
        "finalKeywords" : [ 
            "Italy", 
            "Social change", 
            "Activism", 
            "Contemporary art", 
            "Media", 
            "Politics"
        ],
        "dc:relation_bibo:Website" : "",
        "dc:coverage_vivo:DateTimeInterval_vivo:start" : "",
        "dc:coverage_vivo:DateTimeInterval_vivo:end" : "",
        "foaf:fundedBy_foaf:Agent" : [ 
            ""
        ],
        "foaf:fundedBy_vivo:Grant" : [ 
            ""
        ],
        "dc:subject_anzsrc:for" : [],
        "dc:subject_anzsrc:seo" : "",
        "contributor_ci" : {
            "text_full_name" : "Moises Sacal Bonequi",
            "full_name_honorific" : "Mr Moises Sacal Bonequi",
            "email" : "Moises.Sacal@uts.edu.au",
            "given_name" : "Moises",
            "family_name" : "Sacal Bonequi",
            "honorific" : "Mr",
            "full_name_family_name_first" : "Moises, Sacal Bonequi",
            "username" : "",
            "role" : "Chief Investigator"
        },
        "contributor_data_manager" : {
            "text_full_name" : "Moises Sacal Bonequi",
            "full_name_honorific" : "Mr Moises Sacal Bonequi",
            "email" : "Moises.Sacal@uts.edu.au",
            "given_name" : "Moises",
            "family_name" : "Sacal Bonequi",
            "honorific" : "Mr",
            "full_name_family_name_first" : "Moises, Sacal Bonequi",
            "username" : "",
            "role" : "Data manager"
        },
        "contributors" : [ 
            {
                "full_name_honorific" : "",
                "given_name" : "",
                "family_name" : "",
                "honorific" : "",
                "full_name_family_name_first" : "",
                "username" : "",
                "role" : "Contributors"
            }
        ],
        "contributor_supervisor" : {
            "full_name_honorific" : "",
            "given_name" : "",
            "family_name" : "",
            "honorific" : "",
            "full_name_family_name_first" : "",
            "username" : "",
            "role" : "Supervisor"
        },
        "vivo:Dataset_redbox:DataCollectionMethodology" : "admin-test",
        "vivo:Dataset_dc_format" : "admin-test",
        "vivo:Dataset_redbox:DataCollectionResources" : "",
        "vivo:Dataset_redbox:DataAnalysisResources" : "",
        "vivo:Dataset_redbox:MetadataStandard" : "",
        "vivo:Dataset_redbox:DataStructureStandard" : "",
        "redbox:retentionPeriod_dc:date" : "permanent",
        "redbox:retentionPeriod_dc:date_skos:note" : "",
        "dataowner_name" : "Moises Sacal Bonequi",
        "dataowner_email" : "Moises.Sacal@uts.edu.au",
        "dc:rightsHolder_dc:name" : "student",
        "dc:rightsHolder_dc:description" : "",
        "redbox:ContractualObligations" : "",
        "dc:accessRights" : "by permission from the data manager",
        "dataLicensingAccess_manager" : "Moises Sacal Bonequi",
        "agls:protectiveMarking_dc:type" : [],
        "agls:policy_dc:identifier" : "",
        "agls:policy_skos:note" : "",
        "dc:coverage_dc:identifier" : [ 
            ""
        ],
        "agls:protectiveMarking_skos:note" : "",
        "grant_number_name" : "",
        "workspaces" : [],
        "WorkspaceSelector" : "",
        "vivo:Dataset_dc:location_rdf:PlainLiteral" : "",
        "vivo:Dataset_dc:location_skos:note" : "",
        "@context" : {
            "title" : "http://purl.org/dc/elements/1.1/title",
            "description" : "http://purl.org/dc/elements/1.1/description",
            "startDate" : "http://schema.org/Date",
            "endDate" : "http://schema.org/Date"
        }
    },
    "workflow" : {
        "stage" : "draft",
        "stageLabel" : ""
    },
    "redboxOid" : "70a775a1bd1b27173544e8341cc56162",
    "packageType" : [ 
        "rdmp"
    ],
    "date_object_created" : [ 
        "2019-02-12T01:27:48.535Z"
    ],
    "date_object_modified" : [ 
        "2019-02-12T01:27:48.553Z"
    ]
}