Filter using the logged in user id

Hi,

I'm trying to create a filter that allows a person only to view/edit the
hosts they own themselves.

In the Edit filter dialog I can specify a search to limit to the hosts that
have "owner_id = 5"
What I am looking for (but haven't been able to figure out yet) is how do I
do something like: "owner_id = <user id of the user currently logged in>"

How do I do that?

Niels Basjes

I am afraid we don't support that.

We'd need to implement safemode for the queries for that to get this
working in nice generic form.

LZ

··· On Tue, Jul 15, 2014 at 05:03:10AM -0700, Niels Basjes wrote: > Hi, > > I'm trying to create a filter that allows a person only to view/edit the > hosts they own themselves. > > In the Edit filter dialog I can specify a search to limit to the hosts that > have "owner_id = 5" > What I am looking for (but haven't been able to figure out yet) is how do I > do something like: "owner_id = " > > How do I do that? > > Niels Basjes > > -- > You received this message because you are subscribed to the Google Groups "Foreman users" group. > To unsubscribe from this group and stop receiving emails from it, send an email to foreman-users+unsubscribe@googlegroups.com. > To post to this group, send email to foreman-users@googlegroups.com. > Visit this group at http://groups.google.com/group/foreman-users. > For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal

Just now I found this Feature #6468: Authorization filter owner = current_user - Foreman
So apparently someone else had the same need and created a feature request.

Niels

··· On Jul 16, 2014 12:42 PM, "Lukas Zapletal" wrote:

I am afraid we don’t support that.

We’d need to implement safemode for the queries for that to get this
working in nice generic form.

LZ

On Tue, Jul 15, 2014 at 05:03:10AM -0700, Niels Basjes wrote:

Hi,

I’m trying to create a filter that allows a person only to view/edit the
hosts they own themselves.

In the Edit filter dialog I can specify a search to limit to the hosts
that
have "owner_id = 5"
What I am looking for (but haven’t been able to figure out yet) is how
do I
do something like: "owner_id = "

How do I do that?

Niels Basjes


You received this message because you are subscribed to the Google
Groups “Foreman users” group.
To unsubscribe from this group and stop receiving emails from it, send
an email to foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.


Later,
Lukas @lzap Zapletal


You received this message because you are subscribed to a topic in the
Google Groups “Foreman users” group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/foreman-users/SAIrkPm0aI0/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
foreman-users+unsubscribe@googlegroups.com.
To post to this group, send email to foreman-users@googlegroups.com.
Visit this group at http://groups.google.com/group/foreman-users.
For more options, visit https://groups.google.com/d/optout.