Compare commits
6 Commits
Author | SHA1 | Date | |
---|---|---|---|
33aae65647 | |||
083038d76c | |||
055cf79354 | |||
b4a893d936 | |||
31af2e3238 | |||
4f4cda622f |
@ -4,7 +4,7 @@ WORKDIR /App
|
|||||||
# Copy everything
|
# Copy everything
|
||||||
COPY . ./
|
COPY . ./
|
||||||
|
|
||||||
RUN apt upgrade && apt install libldap -y
|
RUN apt update && apt install libldap-2.5-0 -y
|
||||||
|
|
||||||
# Restore as distinct layers
|
# Restore as distinct layers
|
||||||
RUN dotnet restore ./song_of_the_day/song_of_the_day.csproj
|
RUN dotnet restore ./song_of_the_day/song_of_the_day.csproj
|
||||||
|
31
HISTORY.md
31
HISTORY.md
@ -4,6 +4,37 @@ Changelog
|
|||||||
|
|
||||||
(unreleased)
|
(unreleased)
|
||||||
------------
|
------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Resolve linting errors, refs NOISSUE. [Simon Diesenreiter]
|
||||||
|
|
||||||
|
|
||||||
|
0.2.2 (2025-05-18)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Also send pick suggestion to the group, refs NOISSUE. [Simon
|
||||||
|
Diesenreiter]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
|
||||||
|
0.2.1 (2025-05-17)
|
||||||
|
------------------
|
||||||
|
|
||||||
|
Fix
|
||||||
|
~~~
|
||||||
|
- Fix Docker build, refs NOISSUE. [Simon Diesenreiter]
|
||||||
|
|
||||||
|
Other
|
||||||
|
~~~~~
|
||||||
|
|
||||||
|
|
||||||
|
0.2.0 (2025-05-17)
|
||||||
|
------------------
|
||||||
- Feat: add user management, refs NOISSUE. [Simon Diesenreiter]
|
- Feat: add user management, refs NOISSUE. [Simon Diesenreiter]
|
||||||
- Feat(auth): initial auth added part 2, refs NOISSUE. [Simon
|
- Feat(auth): initial auth added part 2, refs NOISSUE. [Simon
|
||||||
Diesenreiter]
|
Diesenreiter]
|
||||||
|
@ -19,7 +19,8 @@ public class AppConfiguration
|
|||||||
this.AverageDaysBetweenRequests = int.Parse(Environment.GetEnvironmentVariable("AVERAGE_DAYS_BETWEEN_REQUESTS") ?? "2");
|
this.AverageDaysBetweenRequests = int.Parse(Environment.GetEnvironmentVariable("AVERAGE_DAYS_BETWEEN_REQUESTS") ?? "2");
|
||||||
var managersGroupName = Environment.GetEnvironmentVariable("LDAP_ADMINGROUP") ?? "admins";
|
var managersGroupName = Environment.GetEnvironmentVariable("LDAP_ADMINGROUP") ?? "admins";
|
||||||
var userGroupName = Environment.GetEnvironmentVariable("LDAP_USERGROUP") ?? "everybody";
|
var userGroupName = Environment.GetEnvironmentVariable("LDAP_USERGROUP") ?? "everybody";
|
||||||
this.LDAPConfig = new ConfigurationAD() {
|
this.LDAPConfig = new ConfigurationAD()
|
||||||
|
{
|
||||||
Username = Environment.GetEnvironmentVariable("LDAP_BIND") ?? "cn=admin,dc=disi,dc=dev",
|
Username = Environment.GetEnvironmentVariable("LDAP_BIND") ?? "cn=admin,dc=disi,dc=dev",
|
||||||
Password = Environment.GetEnvironmentVariable("LDAP_PASS") ?? "adminPass2022!",
|
Password = Environment.GetEnvironmentVariable("LDAP_PASS") ?? "adminPass2022!",
|
||||||
Port = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("LDAP_BIND")) ? int.Parse(Environment.GetEnvironmentVariable("LDAP_BIND")) : 389,
|
Port = !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("LDAP_BIND")) ? int.Parse(Environment.GetEnvironmentVariable("LDAP_BIND")) : 389,
|
||||||
@ -91,7 +92,8 @@ public class AppConfiguration
|
|||||||
get; private set;
|
get; private set;
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfigurationAD LDAPConfig {
|
public ConfigurationAD LDAPConfig
|
||||||
|
{
|
||||||
get; private set;
|
get; private set;
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -107,9 +107,10 @@ public class LdapIntegration
|
|||||||
|
|
||||||
var userList = new List<LdapUser>();
|
var userList = new List<LdapUser>();
|
||||||
|
|
||||||
foreach(SearchResultEntry result in response.Entries)
|
foreach (SearchResultEntry result in response.Entries)
|
||||||
{
|
{
|
||||||
userList.Add(new LdapUser() {
|
userList.Add(new LdapUser()
|
||||||
|
{
|
||||||
UserId = result.Attributes["uid"][0].ToString(),
|
UserId = result.Attributes["uid"][0].ToString(),
|
||||||
FirstName = result.Attributes["givenName"][0].ToString(),
|
FirstName = result.Attributes["givenName"][0].ToString(),
|
||||||
LastName = result.Attributes["sn"][0].ToString(),
|
LastName = result.Attributes["sn"][0].ToString(),
|
||||||
|
@ -98,6 +98,7 @@ pickOfTheDayTimer.OnOccurence += async (s, ea) =>
|
|||||||
var luckyUser = await dci.Users.ElementAtAsync((new Random()).Next(await dci.Users.CountAsync()));
|
var luckyUser = await dci.Users.ElementAtAsync((new Random()).Next(await dci.Users.CountAsync()));
|
||||||
var userName = string.IsNullOrEmpty(luckyUser.NickName) ? luckyUser.Name : luckyUser.NickName;
|
var userName = string.IsNullOrEmpty(luckyUser.NickName) ? luckyUser.Name : luckyUser.NickName;
|
||||||
SignalIntegration.Instance.SendMessageToGroupAsync($"Today's chosen person to share a song is: **{userName}**");
|
SignalIntegration.Instance.SendMessageToGroupAsync($"Today's chosen person to share a song is: **{userName}**");
|
||||||
|
SignalIntegration.Instance.SendMessageToGroupAsync($"Today's (optional) suggestion helper to help you pick a song is:\n\n**{suggestion.Title}**\n\n*{suggestion.Description}*");
|
||||||
SignalIntegration.Instance.SendMessageToUserAsync($"Congratulations, you have been chosen to share a song today!", luckyUser.SignalMemberId);
|
SignalIntegration.Instance.SendMessageToUserAsync($"Congratulations, you have been chosen to share a song today!", luckyUser.SignalMemberId);
|
||||||
var suggestion = await dci.SuggestionHelpers.ElementAtAsync((new Random()).Next(await dci.SuggestionHelpers.CountAsync()));
|
var suggestion = await dci.SuggestionHelpers.ElementAtAsync((new Random()).Next(await dci.SuggestionHelpers.CountAsync()));
|
||||||
SignalIntegration.Instance.SendMessageToUserAsync($"Today's (optional) suggestion helper to help you pick a song is:\n\n**{suggestion.Title}**\n\n*{suggestion.Description}*", luckyUser.SignalMemberId);
|
SignalIntegration.Instance.SendMessageToUserAsync($"Today's (optional) suggestion helper to help you pick a song is:\n\n**{suggestion.Title}**\n\n*{suggestion.Description}*", luckyUser.SignalMemberId);
|
||||||
|
@ -1 +1 @@
|
|||||||
0.2.0
|
0.2.3
|
||||||
|
Loading…
x
Reference in New Issue
Block a user