Giter VIP home page Giter VIP logo

ruby_old's People

Contributors

bblue avatar

Watchers

 avatar  avatar

ruby_old's Issues

Change route to deal with url, not the get variables a and sa

$route = $routing->route($request->getResourceName(), $visitor, $acl);

ResourceName should not be a funciton in Request. I should send the url to the route mechanism, this is however not possible due to the rewrite rules currently on the test server.

Rewrite the databasedatamapper.php to fix issue #34

The class i generally very messy and must be cleaned up.

A few specific items:

  1. Why is there a reference to $this->_dbTables? This may no longer be in use
  2. The getTables function should also include injected clauses, and maybe the cascade fields (although I would not have a cascade field unless I also had an acceptedField that would set the table)
  3. prepareCriterias() is messy
  4. extractTables should work with an injected source

Create registration page

Remember to create a note in the routing mechanism to allow the registration page access even during "forced login" status.

Create password recovery page

Remember to create a note in the routing mechanism to allow the password recovery page access even during "forced login" status.

Redo the system for tracking errors

The new system must work in a few ways:

  1. The page should still render if the error is only of minor importance
  2. The script might need to reroute to an error page (we should still use the same view, but change the template. That can be done in the AbstractView
  3. The services should probably not contain state
  4. The logging system works fine, so we should keep that.

Error state is currently set via:
$this->setModelState('error', $this->createLogEntry('error description', $this->visitor));

Create a form object

Design an object in the request class to handle any form. The object should get success or error state, as well as validation into the entities.

Propose new file structure

Review the file structure and propose an approach that is more suited for the application and less messy. Note that any change WILL cause a serious amount of grief since the namespace convention matches the file structure.

Improve routing access check

Routing mechanism should make a difference between sending a 403 error due to not being logged in, and another for not having access to that area with logged in user.

Improve the setter function for injectedClauses

This function should not require knowledge of the table name. It should instead be similar to that of the aCriterias argument (second argrument in below).

    $visitor->user = new CollectionProxy(
        $this->_dataMapperFactory->build('user'),
        array('id' => array(array('operator' => '=', 'value' => $visitor->user_id)),
        array('usergroups.id = cascade_usergroups_users.g_id')
        ));

Improve the development function

The development function, such as

    if(PRINT_SQL_QUERY === true)
    {
        echo '<pre>'; print_r($query); echo '</pre>';
    }

should be more clever. I want to only show these messages if we are on the whitelisted development IPs without having to do the same check all over.

This could possibly be done via a configuration class that uses a registry pattern.

Review security fix on $visitor->user_id change

If a visitor is logging in his user id will change. We are then required to dump the stored $user entity within $visitor and reload a new user. The way this is currently done is far from optimal, and it has already caused a few bugs that are difficult to find the cause for.

Upon login/logout the visitor will uncessarily be updated to the db twice

The login/logout function will call the registerVisitor($visitor) function in the Recognition service. This is the same default function that always runs after a succesful command on the controller. This is located in the dispatcher.

/** Dispatcher.php */
$controller->registerCurrentVisitor();

Something should possibly be done to get rid of this extra registration (runs as an update).

Issue with collectionProxy and presetting cascade fields on db tables

It is not possible to use an entity within two separate entities.

For instance:

Usergroups can be collected by the use entity and the route entity, but current code is only applicable one at a time. I need to move the cascade field into the datamapper for the user and route respectively.

This is a serious bug!

State in ACL service

The ACL service contains state, while at the same time the service factory will return a cached ACL. State is therefore transferred into any new ACL.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.