I am trying to create nested groups in ejabberd's mod_shared_roster corresponding to the organizational structure of my enterprise, similar to this:
Group1
- Subgroup1-1
- Subgroup1-2
Group2
- Subgroup2-1
- Subgroup2-1-1
- Subgroup2-1-2
- Subgroup2-2
...
Using web interface I can only make one-level flat group structure.
Is there a way to do it?
This depends in the client. For example, Tkabber supports nested groups (Preferences -> Roster -> Nested and Nested_delimiter), and I have configured :: as delimiter.
Then, in the ejabberd webadmin, I create groups:
g1
Name: Group1
sg11
Name: Group1::Subgroup1-1
Members: user1#localhost usergroup1-1#localhost
Displayed Groups: sg11
When user1 logins, he gets the usergroup1-1 contact and is displayed in a nested group Group1->Subgroup1-1
Related
I have a table called "Domains" with field "Name" (unique, always lowercase) which contains a list of domains and subdomains on my server like:
blah.example.com
www.example.com
www.blah.example.com
example.com
example.nl
example.org
Looking at this list, names 1, 2 and 3 are subdomains of item 4. And I'm looking to just find all domains in this table without these subdomains. Or, to be more precise, any name that does not have part of it in the name from another record. Thus only item 4, 5 and 6.
If record 4 was missing then this query would also have item 1 and 2 as result, but not item 3. After all, item 3 has item 1 as part of it.
Just trying to find the query that can provide me this result... Something with select d.name from domains where d.name not in... Well, there my mind goes blank.
Why?
This list of domains is generated by my web server which registers every new domain that gets requested on it. I'm working on a reporting page where I would display the top domain names to see if there are any weird domains in it. For some reason, I sometimes see unknown domain names in these requests and this might give some additional insight in it all.
I am going to change my code so it will include references to parent domains in the same table in the future but for now I'll have to deal with this and a simple SQL solution.
Use a self-join that matches on suffixes using LIKE
SELECT d1.name
FROM domains AS d1
LEFT JOIN domains AS d2 ON d1.name LIKE CONCAT('%.', d2.name)
WHERE d2.name IS NULL
DEMO
I'm creating a Google Data Studio dashboard with the filter by email option. It's easy to do it when you want to allow the user to see only one option, for example
user region
alice A
bob F
charlie Z
But how can I do to give access to some user to all regions from A to Z? Is there a better way to do it than simply creating 26 rows for every user with this admin access?
I'd like to avoid creating this table:
user region
admin A
admin B
admin C
...
admin Z
and instead do something similar to this
user region
admin *
In bigquery connector, you can write custom query like -
select *
FROM table_name
where
case when #DS_USER_EMAIL IN (select distinct map_field from table_name )
then #DS_USER_EMAIL
else 'all' end = map_field
You will have to create a mapping for 'all' one time. But this works. No need to use feature - filter by email id
I have a CSV that looks like this:
Bob 123.com random.com something.something.com etc
Mike 123.com random.com something.something.something.com etc
Joe etc.com random.domain.com random.com something.com
The names are the labels I am using and the domain names are the attributes that I would want to connect to one another based on similarity (name of attribute). How can I do this without typing every single one of the labels and attributes?
Given your CSV file format, here is an example of how to create unique Person and Domain nodes, and the relationships between them:
LOAD CSV FROM 'url-of-csv' AS row
MERGE (p:Person {name: row[0]})
WITH p, TAIL(row) AS domains
UNWIND domains AS domain
MERGE (d:Domain {name: domain})
MERGE (p)-[:IN]->(d);
And there is an example of how you'd get all the people who are in the random.com domain:
MATCH (d:Domain {name: 'random.com'})<-[:IN]-(p:Person)
RETURN p;
Is it possible in Rundeck to limit a user group to only see a specific group inside of a project. The project has 5 different groups "folders" with jobs in there. I can limit run access to the group I want, but I don't want the user group to see any of the other folders under the project. Does that make sense?
Project
group1 Hide for a user group
group2 Access for all
group3 Hide for a user group
There is.
Just remove read from the job group acl.
The follow acl only allow user from user_group to run and read jobs under group2 only. The users can not read(see) jobs other than jobs under group2
description: Limited user access for group in a project
context:
project: 'project1'
for:
job:
- equals:
group: 'group2'
allow: [run,read]
by:
group: [user_group]
Note: if you have multiple acl, your acl may be overridden by another acl file.
Rundeck ACL
Using SQLAlchemy through Flask-Admin/Flask-Security.
I have 2 roles: "admin" and "user"
Normal users own certain parts of the data (certain rows of the tables) and should only access their own data.
What is the standard idiom only allowing users to access their data but not other users' data? I created a special UserView and overrode get_query and get_count_query and included a filter in these methods. Is that the standard way?
I am new to SLQAlchemy, and I am having trouble filtering tables that are "distant" from the User table.
For example: User to Project (many-to-one), Project to X (many-to-many), X to Y (many-to-many), all with backrefs.
How would I filter in the Y view for a non-admin user to filter only those rows that are reachable from the current user (through Project)?
Thanks!