Register
Submit a solution
The challenge is finished.

Challenge Overview

The goal of this challenge is to make few changes to the CMS frontend pages.

You are updating csfv_frontend_module in this challenge, branch refactor_2015.

Challenge Requirements

Required Changes

You will address the following in this challenge :

  • We currently have cmsUser to give users access to CMS, you can access cms by navigating to “/cms” route. What you need to update in the cms :

    • Model changes :

      • Remove cmsRole model.

      • Merge cmsUser with existing User model.

      • Write a data migration model with possibility for error.

    • Functionality update :

      • Login to /cms will be against User model and validated against admin role (which is tcAdmin).

      • Route : GET /cms/roles

        • Remove all code related to cmsRole and update the code that does the role permissions to only validate that user is an Admin with ‘tcAdmin’ role.

          • ‘tcAdmin’ role should be configured in configuration same as done for forums and common in configuration.js

        • delete this page, cleanup frontend and backend.

      • Route : GET /cms/users

        • The page will display User model.

        • We need to be able to filter user by first name, last name, username, role, email, is admin (checkbox).

          • Search should be case insensitive.

        • Add ability to view User details, it should list all fields of the user (except password), you can use a page same as cms view page.

        • Add new user button and remove buttons should be removed. Backend code should be removed as well.

      • Route : GET /cms/users/:id/edit

        • Update this page to remove drop down.

        • It should display all user information except password.

        • Add checkbox ‘admin’ to set user as admin.

        • Allow editing user information except username.

      • Route : GET /cms/

        • Update filter/search to have new section that allow to search metadata field, it should be multiple key/value pairs, where key is a drop down and value is a text input field.

        • No restriction on UI, but it should be close to the current UI as much as possible. the functionality is important than UI. But having a clean UI is plus.

    • Logic fixes in frontend and cms :

      • we need to track loginIP and loginLastDate, these fields exist in User model but we don’t track IP or last date. We want to update these fields in every login user makes.

  • Cleanup the code, and remove not needed code.

  • Add proper documentation/inline when needed.

  • No need to add changelog per file.

  • Migration scripts are MUST.

  • Update README file if needed.

  • Follow this document for AnguarJS best practices :

    • all frontend Angularjs files should be placed under /public/cms folder in csfv_frontend_module.

  • We are open to your creativity for refactoring the functionality.

  • Update test data generator.

Required Fixes

  • Searching users/roles, sorting and pagination should be moved to server side instead of being in done in client side.

  • Search should apply “OR”ing between values of same search field, and applies “AND”ing between all search fields.

Documentation Provided

  • The deployment guide of the CSFV website located in the github private repos, in README file. Ask questions in challenge forums. if you have troubles deploying the websites.

Source Code

Source code exists in private github repo https://github.com/topcoderinc/

If you get 404 then you need permission to access it. Request it in challenge forums, copilot will add you to the repository and you should receive email about you being added to github. Post your *github* account name when requesting access.

Get Started

You need to run the following to get CMS running and Frontend application pages up :

  • Checkout csfv_test_data_generator

  • Checkout branch refactor_2015.

  • Update db configuration in config/development.js, you don’t need to change it if you are using localhost in default port, and no username/password.

  • Run ‘npm install’

  • Run ‘node app.js’

  • Kill the app when you see ‘generation done.

  • Checkout csfv_frontend_module

  • Checkout branch refactor_2015.

  • Update configuration following README.

  • run ‘npm install’

  • run ‘node app-sockets.js’

  • run ‘node app.js’

  • access http://csfv.com:8889/cms

    • You might need to configure your hosts file to point csfv.com to 127.0.0.1

Submission Deliverables

Below is an overview of the deliverables:

  • Patch file of changes.

  • Deployment document with verification screens for reviewers.

  • Updated csfv_test_data_generator module if needed.

Final Submission

For each member, the final submission should be uploaded to the Online Review Tool.

 


Final Submission Guidelines

.

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30050705