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

Why re-authentication to create new model? #39

Open
k00ni opened this issue Nov 24, 2012 · 2 comments
Open

Why re-authentication to create new model? #39

k00ni opened this issue Nov 24, 2012 · 2 comments

Comments

@k00ni
Copy link
Member

k00ni commented Nov 24, 2012

This issue occurs in relation to OntoWiki! I am in an action of a controller.

For instance:

class CollaboController extends OntoWiki_Controller_Component {

   /**
    * Import an ontology for given URI
    */
   public function importontologyAction () {

The plan is to create a new model via

$this->_erfurt->getStore()->getNewModel($ontologyUri, '', $newType);

But when iam doing this, it throws an exception that this operation is not allowed. For the record, i am logged in as Admin.

It runs perfectly when i authenticate myself again:

$backend = $this->_erfurt->getConfig()->store->backend;
$username = $this->_erfurt->getConfig()->store->{$backend}->username;
$password = $this->_erfurt->getConfig()->store->{$backend}->password;

$this->_erfurt->authenticate($username, $password);

After that i am able to create a new model. But was that your intention? I thought OntoWiki handle Erfurt authentication by itself.

@white-gecko
Copy link
Member

Where is the $this->_erfurt object coming from? If you got it from the OntoWiki instance this is strange for sure. Can you provide a complete minimal (not)working example for this?

@k00ni
Copy link
Member Author

k00ni commented Mar 6, 2014

$this->_erfurt comes from the class OntoWiki_Controller_Component. Providing a complete example is not possible, because i am not quite sure how code was, but i guess it was just a getNewModell call in a function (here importontologyAction) of the controller.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants