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

Can't update Operating system #2864

Closed
yllen opened this issue Sep 28, 2017 · 5 comments
Closed

Can't update Operating system #2864

yllen opened this issue Sep 28, 2017 · 5 comments
Assignees
Labels
Milestone

Comments

@yllen
Copy link
Collaborator

yllen commented Sep 28, 2017

In operating system of a computer, if i change the field Name
"Cannot update item: not enough right's on the parent(s) item(s)"

In massive action, action indicated successfully but nothing done.
For change input "N/A (1516): Incompatible Items"

See also: http://forum.glpi-project.org/viewtopic.php?id=159124

@yllen
Copy link
Collaborator Author

yllen commented Nov 3, 2017

For me the correction is not correct. entities_id must stay for performance.
The correct correction is to add oeratingsytem in object managed with formard_entity_to of a computer

@yllen yllen reopened this Nov 3, 2017
@remicollet
Copy link
Contributor

remicollet commented Nov 3, 2017

Seems OK forward_entity_to and optimization is for CommonDBChild, not needed for CommonDBRelation

My fault, sorry for the noise

Checker (may become a unit test)

<?php
require 'inc/includes.php';

echo "+ Login\n";
$auth = new Auth();
var_dump($auth->login('glpi', 'glpi', true));

var_dump(Session::changeActiveEntities(2, true));

echo "+ Disk\n";
$d = new ComputerDisk();
var_dump($d->can(1, READ));
var_dump($d->can(2, READ));

echo "+ OS\n";
$o = new Item_OperatingSystem();

var_dump($o->can(1, READ));
var_dump($o->can(2, READ));

All id=1 belongs to Entity 1, id=2 to Entity=2

Ouput

+ Login
bool(true)
bool(true)
+ Disk
bool(false)
bool(true)
+ OS
bool(false)
bool(true)

So right check seems ok.

@remicollet
Copy link
Contributor

BTW, the forward_entity_to way seems a better fix

@yllen
Copy link
Collaborator Author

yllen commented Nov 3, 2017

$forward_entity_to is used in update of commonDBTM
and it also defined in calendar that iis a commonDropdown, not CommonDbChild or CommonDBRelation

@trasher trasher removed their assignment Nov 3, 2017
@trasher trasher closed this as completed in 8e41baa Nov 3, 2017
@trasher
Copy link
Contributor

trasher commented Nov 3, 2017

Should not have been closed... Was a revert :D

@trasher trasher reopened this Nov 3, 2017
@trasher trasher mentioned this issue Nov 7, 2017
@trasher trasher self-assigned this Nov 8, 2017
@trasher trasher closed this as completed Nov 9, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants