Re: [Dspace-tech] eperson and groups

2015-05-22 Thread helix84
On Fri, May 22, 2015 at 9:07 AM, Vegard Korvald vegard.korv...@usit.uio.no
wrote:

  Is it possible to make groups with the CLI, similar to the «user»
 command for creating users, or in any other way script this behavior?


Well again, not currently using CLI, but using SQL. This used to be just
one insert, now it's two. Add a new row to the epersongroup table and its
name to the metadatavalue table.

INSERT INTO epersongroup (eperson_group_id) VALUES
(nextval('epersongroup_seq'));
INSERT INTO metadatavalue (metadata_field_id, resource_type_id,
resource_id, text_value) VALUES (
  (SELECT metadata_field_id
FROM metadatafieldregistry
WHERE metadata_schema_id = 1
AND element = 'title'
AND qualifier IS NULL
  ),
  6,
  currval('epersongroup_seq'),
  'NEW_GROUP_NAME');


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] eperson and groups

2015-05-22 Thread Daniel Francis

Dear Vergard,

Perhaps this one will help. in your command line type the following then
(enter)

/dspace/bin/dspace user -a -m sam...@yourdomain.com -g yourname -s surname
User -p yourpassword

sam...@yourdomain.com (email address)

yourname (given name)

surname (your surname)

yourpassword (password)

Regards.

Daniel Francis.

--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


Re: [Dspace-tech] eperson and groups

2015-05-22 Thread Vegard Korvald
That worked like a charm, helix84!

Is it possible to make groups with the CLI, similar to the «user» command for 
creating users, or in any other way script this behavior?


--
Vegard


From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of helix84
Sent: Thursday, May 21, 2015 12:57 PM
To: Vegard Korvald
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] eperson and groups

On Thu, May 21, 2015 at 12:22 PM, Vegard Korvald 
vegard.korv...@usit.uio.nomailto:vegard.korv...@usit.uio.no wrote:
I used SELECT * FROM epersongroup  to get the IDs, but I couldn't seem to 
find the corresponding group name in the database. To find the name I had to 
look it up as an admin on our DSpace page under Access Control-Groups. Is 
there a way to find the IDs and names of the groups in the database?

Sorry about that, I forgot to note that since DSpace 5, the epersongroup table 
changed due to the metadata for all dspace objects feature. You can get the 
same view on the table as in previous versions using this query instead (6 is 
the constant for group):


SELECT e.*, m.text_value AS name FROM epersongroup e

LEFT JOIN metadatavalue m ON (

  m.resource_id = e.eperson_group_id

  AND m.resource_type_id = 6

)


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] eperson and groups

2015-05-21 Thread Vegard Korvald
Thank you, helix84! By using psql I could add an eperson into a group without 
any problems.

I used SELECT * FROM epersongroup  to get the IDs, but I couldn't seem to 
find the corresponding group name in the database. To find the name I had to 
look it up as an admin on our DSpace page under Access Control-Groups. Is 
there a way to find the IDs and names of the groups in the database?


--
Vegard


-Original Message-
From: ivan.ma...@gmail.com [mailto:ivan.ma...@gmail.com] On Behalf Of
helix84
Sent: Tuesday, May 19, 2015 1:15 PM
To: Vegard Korvald
Cc: dspace-tech@lists.sourceforge.net
Subject: Re: [Dspace-tech] eperson and groups

I don't think it's doable with the currently available CLI commands in DSpace:
https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts


You could, however, use a CLI SQL client (psql) to manipulate membership in
the epersongroup2eperson table. You can find out the user and group IDs
from the eperson and epersongroup table, respectively.

Alternatively, assuming you're using password authentication and want to put
all users into a single group, you can use the login.specialgroup option in
[dspace]/config/modules/authentication-password.cfg. Please note that
special group membership is dynamic - it doesn't appear in the
epersongroup2eperson table, but you can check effective membership in the
profile of a logged in user.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y
___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette


Re: [Dspace-tech] eperson and groups

2015-05-21 Thread helix84
On Thu, May 21, 2015 at 12:22 PM, Vegard Korvald vegard.korv...@usit.uio.no
 wrote:

 I used SELECT * FROM epersongroup  to get the IDs, but I couldn't seem
 to find the corresponding group name in the database. To find the name I
 had to look it up as an admin on our DSpace page under Access
 Control-Groups. Is there a way to find the IDs and names of the groups in
 the database?


Sorry about that, I forgot to note that since DSpace 5, the epersongroup
table changed due to the metadata for all dspace objects feature. You can
get the same view on the table as in previous versions using this query
instead (6 is the constant for group):

SELECT e.*, m.text_value AS name FROM epersongroup eLEFT JOIN
metadatavalue m ON (
  m.resource_id = e.eperson_group_id
  AND m.resource_type_id = 6)



Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Re: [Dspace-tech] eperson and groups

2015-05-19 Thread helix84
I don't think it's doable with the currently available CLI commands in
DSpace:
https://wiki.duraspace.org/display/DSDOC5x/Managing+User+Accounts

You could, however, use a CLI SQL client (psql) to manipulate membership in
the epersongroup2eperson table. You can find out the user and group IDs
from the eperson and epersongroup table, respectively.

Alternatively, assuming you're using password authentication and want to
put all users into a single group, you can use the login.specialgroup
option in [dspace]/config/modules/authentication-password.cfg. Please note
that special group membership is dynamic - it doesn't appear in the
epersongroup2eperson table, but you can check effective membership in the
profile of a logged in user.


Regards,
~~helix84

Compulsory reading: DSpace Mailing List Etiquette
https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette
--
One dashboard for servers and applications across Physical-Virtual-Cloud 
Widest out-of-the-box monitoring support with 50+ applications
Performance metrics, stats and reports that give you Actionable Insights
Deep dive visibility with transaction tracing using APM Insight.
http://ad.doubleclick.net/ddm/clk/290420510;117567292;y___
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette